mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Added endpoint for removing user from service, all tests passing.
This commit is contained in:
@@ -40,6 +40,8 @@ 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):
|
||||
@@ -58,5 +60,7 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user