Added endpoint for removing user from service, all tests passing.

This commit is contained in:
Nicholas Staples
2016-03-22 13:14:23 +00:00
parent a0ea15d728
commit 090babaaeb
7 changed files with 116 additions and 9 deletions

View File

@@ -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