diff --git a/app/errors.py b/app/errors.py index ac0f7bf60..7617e0add 100644 --- a/app/errors.py +++ b/app/errors.py @@ -40,8 +40,6 @@ def register_errors(blueprint): @blueprint.app_errorhandler(500) def internal_server_error(e): - if current_app.config.get('DEBUG'): - raise e if isinstance(e, str): current_app.logger.exception(e) elif isinstance(e, Exception): @@ -60,7 +58,5 @@ def register_errors(blueprint): @blueprint.app_errorhandler(SQLAlchemyError) def db_error(e): - if current_app.config.get('DEBUG'): - raise e current_app.logger.exception(e) return jsonify(result='error', message=str(e)), 500 diff --git a/config.py b/config.py index e188940b0..0bf45618c 100644 --- a/config.py +++ b/config.py @@ -83,7 +83,7 @@ class Development(Config): DEBUG = True -class Test(Config): +class Test(Development): pass configs = {