Bugfix: openrc api dump should be safe_dump
[yardstick.git] / api / server.py
index 158b8a5..914fe84 100644 (file)
@@ -35,14 +35,17 @@ except ImportError:
 LOG = logging.getLogger(__name__)
 
 app = Flask(__name__)
+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()