summaryrefslogtreecommitdiffstats
path: root/api/server.py
diff options
context:
space:
mode:
authorAbhijit Sinha <abhijit.sinha@intel.com>2018-06-14 13:32:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-06-14 13:32:40 +0000
commit025418b9abe2d0d1f7eba575750d087616b02235 (patch)
tree7109498a5a353553add7297aab1711f47c674e7c /api/server.py
parent7dc30d54a77249d95d2a89770393cee98ff63c8c (diff)
parent4bc3b756f0eefad98aeacf32865eda85a61fb157 (diff)
Merge "Bugfix: openrc api dump should be safe_dump" into stable/fraser
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()