summaryrefslogtreecommitdiff
path: root/opendc/api/v2/paths
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-06-24 10:05:22 +0200
committerGeorgios Andreadis <info@gandreadis.com>2020-06-24 10:05:22 +0200
commitc7f773b027019086153f0260b507c8fa173ee5e8 (patch)
tree982048b9a117f1c03abeb26ab84d70f4a82115f8 /opendc/api/v2/paths
parentbae760a62fc6a480fbe615dff6a7de03c7fd6d1d (diff)
Fix API serialization issues
Diffstat (limited to 'opendc/api/v2/paths')
-rw-r--r--opendc/api/v2/paths/pathId/branches/endpoint.py2
-rw-r--r--opendc/api/v2/paths/pathId/endpoint.py2
-rw-r--r--opendc/api/v2/paths/pathId/sections/endpoint.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/opendc/api/v2/paths/pathId/branches/endpoint.py b/opendc/api/v2/paths/pathId/branches/endpoint.py
index 5d3b6ec1..d3256e8c 100644
--- a/opendc/api/v2/paths/pathId/branches/endpoint.py
+++ b/opendc/api/v2/paths/pathId/branches/endpoint.py
@@ -21,7 +21,7 @@ def POST(request):
request.check_required_parameters(path={'pathId': 'int'}, body={'section': {'startTick': 'int'}})
except exceptions.ParameterError as e:
- return Response(400, e.message)
+ return Response(400, str(e))
# Instantiate the current Path from the database
diff --git a/opendc/api/v2/paths/pathId/endpoint.py b/opendc/api/v2/paths/pathId/endpoint.py
index 7a73ce17..42357fc5 100644
--- a/opendc/api/v2/paths/pathId/endpoint.py
+++ b/opendc/api/v2/paths/pathId/endpoint.py
@@ -12,7 +12,7 @@ def GET(request):
request.check_required_parameters(path={'pathId': 'int'})
except exceptions.ParameterError as e:
- return Response(400, e.message)
+ return Response(400, str(e))
# Instantiate a Path from the database
diff --git a/opendc/api/v2/paths/pathId/sections/endpoint.py b/opendc/api/v2/paths/pathId/sections/endpoint.py
index b8e4a861..a983ff1f 100644
--- a/opendc/api/v2/paths/pathId/sections/endpoint.py
+++ b/opendc/api/v2/paths/pathId/sections/endpoint.py
@@ -12,7 +12,7 @@ def GET(request):
try:
request.check_required_parameters(path={'pathId': 'int'})
except exceptions.ParameterError as e:
- return Response(400, e.message)
+ return Response(400, str(e))
# Instantiate a Path from the database