Improvements to the tests.

Update AuthError with a to_dict_v2 method.
This commit is contained in:
Rebecca Law
2016-11-01 10:33:34 +00:00
parent a358f3cb3a
commit 482d10545b
8 changed files with 58 additions and 46 deletions

View File

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