Include keystone message when authentication failed
This was lost in the fix for bug #1526944 but it might be useful. Change-Id: Ifa8a1b3c2ff2ce6ec79328fb77065eb216e0f538 Related-Bug: #1526944
This commit is contained in:
@@ -209,7 +209,8 @@ class HTTPClient(object):
|
||||
if not ('X-Auth-Key' in kwargs['headers']) and (
|
||||
resp.status_code == 401 or
|
||||
(resp.status_code == 500 and "(HTTP 401)" in resp.content)):
|
||||
raise exc.HTTPUnauthorized("Authentication failed")
|
||||
raise exc.HTTPUnauthorized(_("Authentication failed: %s")
|
||||
% resp.content)
|
||||
elif 400 <= resp.status_code < 600:
|
||||
raise exc.from_response(resp)
|
||||
elif resp.status_code in (301, 302, 305):
|
||||
|
||||
Reference in New Issue
Block a user