mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-03 07:40:19 -04:00
Improvements to the tests.
Update AuthError with a to_dict_v2 method.
This commit is contained in:
@@ -51,10 +51,7 @@ def register_errors(blueprint):
|
||||
|
||||
@blueprint.errorhandler(AuthError)
|
||||
def auth_error(error):
|
||||
return jsonify(status_code=error.code,
|
||||
message=error.message,
|
||||
code=error.code,
|
||||
link='link to docs'), error.code
|
||||
return jsonify(error.to_dict_v2()), error.code
|
||||
|
||||
@blueprint.errorhandler(Exception)
|
||||
def internal_server_error(error):
|
||||
|
||||
Reference in New Issue
Block a user