mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Improve text for error messages
This commit is contained in:
@@ -88,12 +88,12 @@ def register_errors(blueprint):
|
||||
|
||||
@blueprint.errorhandler(401)
|
||||
def unauthorized(e):
|
||||
error_message = "Unauthorized, authentication token must be provided"
|
||||
error_message = "Unauthorized: authentication token must be provided"
|
||||
return jsonify(result='error', message=error_message), 401, [('WWW-Authenticate', 'Bearer')]
|
||||
|
||||
@blueprint.errorhandler(403)
|
||||
def forbidden(e):
|
||||
error_message = "Forbidden, invalid authentication token provided"
|
||||
error_message = "Forbidden: invalid authentication token provided"
|
||||
return jsonify(result='error', message=error_message), 403
|
||||
|
||||
@blueprint.errorhandler(429)
|
||||
|
||||
Reference in New Issue
Block a user