Fix auth failed exception handler
This patch fixes the auth failed exception handler so that we get back a meaningful result when authentication fails. Change-Id: I2f37daed3890fd685fa6f701938b675460e76b0c Signed-off-by: Ian Main <imain@redhat.com>
This commit is contained in:
parent
daa2c72f0c
commit
a093e6d074
@ -529,9 +529,9 @@ class BaseClient(object):
|
||||
elif status_code in self.REDIRECT_RESPONSE_CODES:
|
||||
raise exception.RedirectException(res.getheader('Location'))
|
||||
elif status_code == httplib.UNAUTHORIZED:
|
||||
raise exception.NotAuthorized(res.read())
|
||||
raise exception.NotAuthorized()
|
||||
elif status_code == httplib.FORBIDDEN:
|
||||
raise exception.NotAuthorized(res.read())
|
||||
raise exception.NotAuthorized()
|
||||
elif status_code == httplib.NOT_FOUND:
|
||||
raise exception.NotFound(res.read())
|
||||
elif status_code == httplib.CONFLICT:
|
||||
|
Loading…
Reference in New Issue
Block a user