diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-26 12:17:26 +0200 |
|---|---|---|
| committer | Georgios Andreadis <info@gandreadis.com> | 2020-06-26 12:17:26 +0200 |
| commit | 92b94b59ad80329a2c99471edbf5bbdc9af1e525 (patch) | |
| tree | d9b71de4473ffe5d5decc8631f82429694860dcc /opendc/api/v2/simulations/simulationId/topologies | |
| parent | c15448fb6f3aacc8939f2714fc20304dde98cd28 (diff) | |
Revamp error responses
Diffstat (limited to 'opendc/api/v2/simulations/simulationId/topologies')
| -rw-r--r-- | opendc/api/v2/simulations/simulationId/topologies/endpoint.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/opendc/api/v2/simulations/simulationId/topologies/endpoint.py b/opendc/api/v2/simulations/simulationId/topologies/endpoint.py index 4104c4dd..d8467b40 100644 --- a/opendc/api/v2/simulations/simulationId/topologies/endpoint.py +++ b/opendc/api/v2/simulations/simulationId/topologies/endpoint.py @@ -12,10 +12,7 @@ def POST(request): # Make sure required parameters are there - try: - request.check_required_parameters(body={'topology': {'name': 'string'}}) - except exceptions.ParameterError as e: - return Response(400, str(e)) + request.check_required_parameters(body={'topology': {'name': 'string'}}) # Instantiate a Topology object from our request, and add some metadata |
