From 1563fb7d0d9d1bffd2e581e4c119377b8a82ee1b Mon Sep 17 00:00:00 2001 From: Nick Gravgaard Date: Wed, 7 May 2014 15:46:23 +0000 Subject: [PATCH] Include incorrect token string in error message https://www.pivotaltracker.com/story/show/69910594 [Delivers #69910594] --- backdrop/write/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backdrop/write/api.py b/backdrop/write/api.py index 735b0a0b..18c37221 100644 --- a/backdrop/write/api.py +++ b/backdrop/write/api.py @@ -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):