diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-24 10:05:22 +0200 |
|---|---|---|
| committer | Georgios Andreadis <info@gandreadis.com> | 2020-06-24 10:05:22 +0200 |
| commit | c7f773b027019086153f0260b507c8fa173ee5e8 (patch) | |
| tree | 982048b9a117f1c03abeb26ab84d70f4a82115f8 /opendc/api/v2/datacenters | |
| parent | bae760a62fc6a480fbe615dff6a7de03c7fd6d1d (diff) | |
Fix API serialization issues
Diffstat (limited to 'opendc/api/v2/datacenters')
| -rw-r--r-- | opendc/api/v2/datacenters/datacenterId/endpoint.py | 2 | ||||
| -rw-r--r-- | opendc/api/v2/datacenters/datacenterId/rooms/endpoint.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/opendc/api/v2/datacenters/datacenterId/endpoint.py b/opendc/api/v2/datacenters/datacenterId/endpoint.py index 14dbbd2a..3265abb2 100644 --- a/opendc/api/v2/datacenters/datacenterId/endpoint.py +++ b/opendc/api/v2/datacenters/datacenterId/endpoint.py @@ -12,7 +12,7 @@ def GET(request): request.check_required_parameters(path={'datacenterId': 'int'}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Instantiate a Datacenter from the database diff --git a/opendc/api/v2/datacenters/datacenterId/rooms/endpoint.py b/opendc/api/v2/datacenters/datacenterId/rooms/endpoint.py index 2cca01fd..593b38a7 100644 --- a/opendc/api/v2/datacenters/datacenterId/rooms/endpoint.py +++ b/opendc/api/v2/datacenters/datacenterId/rooms/endpoint.py @@ -12,7 +12,7 @@ def GET(request): try: request.check_required_parameters(path={'datacenterId': 'int'}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Instantiate a Datacenter from the database @@ -48,7 +48,7 @@ def POST(request): 'roomType': 'string' }}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Make sure the passed object's datacenter id matches the path datacenter id |
