Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Include incorrect token string in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-gravgaard authored and Paul M Furley committed May 8, 2014
1 parent a5f2ba9 commit 1563fb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backdrop/write/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ def _validate_auth(data_set_config):
abort(401, 'Authorization header missing.')

if not auth_header_is_valid(data_set_config, auth_header):
abort(401, 'Unauthorized')
token = extract_bearer_token(auth_header)
abort(401, 'Unauthorized: Invalid bearer token "{}"'.format(token))


def _append_to_data_set(data_set_config, data, ok_message=None):
Expand Down

0 comments on commit 1563fb7

Please sign in to comment.