Allow exception tracebacks to get logged to the log file.

This commit is contained in:
jakedt 2014-02-25 16:54:49 -05:00
parent 4b689a7a7c
commit fa4c925e4d

View file

@ -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():