aboutsummaryrefslogtreecommitdiffstats
path: root/api/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/server.py')
-rw-r--r--api/server.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/api/server.py b/api/server.py
index 37a1ab6a6..914fe8457 100644
--- a/api/server.py
+++ b/api/server.py
@@ -39,11 +39,13 @@ app.config['MAX_CONTENT_LENGTH'] = 2 * 1024 * 1024 * 1024
Swagger(app)
-api = Api(app)
+api = Api(app, errors=consts.API_ERRORS)
@app.teardown_request
def shutdown_session(exception=None):
+ if exception:
+ LOG.warning(exception.message)
db_session.remove()