X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=api%2Fserver.py;h=914fe8457b9d75172274aa2e1ade0f40df085f59;hb=1517319fd210d71db72c5e4bfa00fc49ae4fa877;hp=37a1ab6a64acf0b76b2d8b7b2efdd2f140d09bd3;hpb=564496eae84e4b8916d2102222eb95877a338b20;p=yardstick.git 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()