summaryrefslogtreecommitdiff
path: root/main.py
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 /main.py
parentbae760a62fc6a480fbe615dff6a7de03c7fd6d1d (diff)
Fix API serialization issues
Diffstat (limited to 'main.py')
-rw-r--r--main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.py b/main.py
index 177fc7c6..6f8ddbef 100644
--- a/main.py
+++ b/main.py
@@ -85,7 +85,7 @@ def sign_in():
@FLASK_CORE_APP.route('/api/<string:version>/<path:endpoint_path>', methods=['GET', 'POST', 'PUT', 'DELETE'])
def api_call(version, endpoint_path):
- """Call an API endpoint directly over HTTP"""
+ """Call an API endpoint directly over HTTP."""
# Get path and parameters
(path, path_parameters) = path_parser.parse(version, endpoint_path)
@@ -169,7 +169,7 @@ def _process_message(message):
response.id = message['id']
except exceptions.RequestInitializationError as e:
- response = rest.Response(400, e.message)
+ response = rest.Response(400, str(e))
response.id = message['id']
if not 'method' in message: