From 92b94b59ad80329a2c99471edbf5bbdc9af1e525 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 26 Jun 2020 12:17:26 +0200 Subject: Revamp error responses --- opendc/api/v2/simulations/endpoint.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'opendc/api/v2/simulations/endpoint.py') diff --git a/opendc/api/v2/simulations/endpoint.py b/opendc/api/v2/simulations/endpoint.py index dfeb8d5e..62257d40 100644 --- a/opendc/api/v2/simulations/endpoint.py +++ b/opendc/api/v2/simulations/endpoint.py @@ -11,10 +11,7 @@ from opendc.util.rest import Response def POST(request): """Create a new simulation, and return that new simulation.""" - try: - request.check_required_parameters(body={'simulation': {'name': 'string'}}) - except exceptions.ParameterError as e: - return Response(400, str(e)) + request.check_required_parameters(body={'simulation': {'name': 'string'}}) topology = Topology({'name': 'Default topology'}) topology.insert() -- cgit v1.2.3