Use new email validation.

Use logger.exception where it makes sense, not for SqlAlchemy errors as it give too much information away.
This commit is contained in:
Rebecca Law
2016-03-08 15:47:35 +00:00
parent cbc585a1b1
commit 29a7289d1e
3 changed files with 10 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ def register_errors(blueprint):
@blueprint.app_errorhandler(500)
def internal_server_error(e):
if isinstance(e, str):
current_app.logger.error(e)
current_app.logger.exception(e)
elif isinstance(e, Exception):
current_app.logger.exception(e)
return jsonify(result='error', message="Internal server error"), 500