Merge remote-tracking branch 'origin/master' into rustedbuilds

This commit is contained in:
jakedt 2014-02-25 17:19:15 -05:00
commit b9580c1c29

View file

@ -91,13 +91,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():