Skip to content
Snippets Groups Projects
Commit 09a72bed authored by Jan Mach's avatar Jan Mach
Browse files

Added logfile logging for BAD REQUEST HTTP errors.

To better understand what went wrong with the request. (Redmine issue: #3443)
parent 96604a0a
No related branches found
No related tags found
No related merge requests found
......@@ -190,6 +190,14 @@ def _setup_app_core(app):
@app.errorhandler(400)
def eh_badrequest(err): # pylint: disable=locally-disabled,unused-variable
"""Flask error handler to be called to service HTTP 400 error."""
flask.current_app.logger.critical(
"Bad Request Error:\n%s",
''.join(
traceback.TracebackException(
*sys.exc_info()
).format()
)
)
return hawat.errors.error_handler_switch(400, err)
@app.errorhandler(403)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment