Allow exception tracebacks to get logged to the log file.
This commit is contained in:
parent
4b689a7a7c
commit
fa4c925e4d
1 changed files with 4 additions and 2 deletions
|
@ -57,12 +57,14 @@ def common_login(db_user):
|
|||
|
||||
@app.errorhandler(model.DataModelException)
|
||||
def handle_dme(ex):
|
||||
return make_response(ex.message, 400)
|
||||
logger.exception(ex)
|
||||
return make_response('Internal Server Error', 500)
|
||||
|
||||
|
||||
@app.errorhandler(KeyError)
|
||||
def handle_dme_key_error(ex):
|
||||
return make_response(ex.message, 400)
|
||||
logger.exception(ex)
|
||||
return make_response('Internal Server Error', 500)
|
||||
|
||||
|
||||
def generate_csrf_token():
|
||||
|
|
Reference in a new issue