From b96b226badb3059773473e16f9a74dcfba9b13ca Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Fri, 11 Mar 2016 15:52:28 +0000 Subject: [PATCH] Log exception --- app/errors.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/errors.py b/app/errors.py index 9d784fa89..7617e0add 100644 --- a/app/errors.py +++ b/app/errors.py @@ -48,15 +48,15 @@ def register_errors(blueprint): @blueprint.app_errorhandler(NoResultFound) def no_result_found(e): - current_app.logger.error(str(e)) + current_app.logger.exception(e) return jsonify(result='error', message="No result found"), 404 @blueprint.app_errorhandler(DataError) def data_error(e): - current_app.logger.error(str(e)) + current_app.logger.exception(e) return jsonify(result='error', message="No result found"), 404 @blueprint.app_errorhandler(SQLAlchemyError) def db_error(e): - current_app.logger.error(str(e)) + current_app.logger.exception(e) return jsonify(result='error', message=str(e)), 500