Leave ISEs as 400s, but log exceptions and have slightly improved error messages.
This commit is contained in:
parent
fa4c925e4d
commit
9afd49e882
1 changed files with 2 additions and 2 deletions
|
@ -58,13 +58,13 @@ def common_login(db_user):
|
|||
@app.errorhandler(model.DataModelException)
|
||||
def handle_dme(ex):
|
||||
logger.exception(ex)
|
||||
return make_response('Internal Server Error', 500)
|
||||
return make_response(ex.message, 400)
|
||||
|
||||
|
||||
@app.errorhandler(KeyError)
|
||||
def handle_dme_key_error(ex):
|
||||
logger.exception(ex)
|
||||
return make_response('Internal Server Error', 500)
|
||||
return make_response('Invalid key: %s' % ex.message, 400)
|
||||
|
||||
|
||||
def generate_csrf_token():
|
||||
|
|
Reference in a new issue