From c7f773b027019086153f0260b507c8fa173ee5e8 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 24 Jun 2020 10:05:22 +0200 Subject: Fix API serialization issues --- opendc/api/v2/specifications/cpus/id/endpoint.py | 2 +- opendc/api/v2/specifications/failure-models/id/endpoint.py | 2 +- opendc/api/v2/specifications/gpus/id/endpoint.py | 2 +- opendc/api/v2/specifications/memories/id/endpoint.py | 2 +- opendc/api/v2/specifications/storages/id/endpoint.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'opendc/api/v2/specifications') diff --git a/opendc/api/v2/specifications/cpus/id/endpoint.py b/opendc/api/v2/specifications/cpus/id/endpoint.py index 9c4229e1..205b61c5 100644 --- a/opendc/api/v2/specifications/cpus/id/endpoint.py +++ b/opendc/api/v2/specifications/cpus/id/endpoint.py @@ -12,7 +12,7 @@ def GET(request): request.check_required_parameters(path={'id': 'int'}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Instantiate a CPU and make sure it exists diff --git a/opendc/api/v2/specifications/failure-models/id/endpoint.py b/opendc/api/v2/specifications/failure-models/id/endpoint.py index 67fe004a..db450f70 100644 --- a/opendc/api/v2/specifications/failure-models/id/endpoint.py +++ b/opendc/api/v2/specifications/failure-models/id/endpoint.py @@ -12,7 +12,7 @@ def GET(request): request.check_required_parameters(path={'id': 'int'}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Instantiate a FailureModel and make sure it exists diff --git a/opendc/api/v2/specifications/gpus/id/endpoint.py b/opendc/api/v2/specifications/gpus/id/endpoint.py index e08833b8..489b7e8d 100644 --- a/opendc/api/v2/specifications/gpus/id/endpoint.py +++ b/opendc/api/v2/specifications/gpus/id/endpoint.py @@ -12,7 +12,7 @@ def GET(request): request.check_required_parameters(path={'id': 'int'}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Instantiate a GPU and make sure it exists diff --git a/opendc/api/v2/specifications/memories/id/endpoint.py b/opendc/api/v2/specifications/memories/id/endpoint.py index 5f547f76..f34ca36f 100644 --- a/opendc/api/v2/specifications/memories/id/endpoint.py +++ b/opendc/api/v2/specifications/memories/id/endpoint.py @@ -12,7 +12,7 @@ def GET(request): request.check_required_parameters(path={'id': 'int'}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Instantiate a Memory and make sure it exists diff --git a/opendc/api/v2/specifications/storages/id/endpoint.py b/opendc/api/v2/specifications/storages/id/endpoint.py index b1f7e8c0..1b7a5ac7 100644 --- a/opendc/api/v2/specifications/storages/id/endpoint.py +++ b/opendc/api/v2/specifications/storages/id/endpoint.py @@ -12,7 +12,7 @@ def GET(request): request.check_required_parameters(path={'id': 'int'}) except exceptions.ParameterError as e: - return Response(400, e.message) + return Response(400, str(e)) # Instantiate a Storage and make sure it exists -- cgit v1.2.3