Return the entire response in an InvalidResponse
It's much more helpful to return the entire response in an InvalidResponse. It's already done this way in [1] and [2]. [1] http://git.openstack.org/cgit/stackforge/python-openstacksdk/tree/openstack/auth/identity/v2.py#n95 [2] http://git.openstack.org/cgit/stackforge/python-openstacksdk/tree/openstack/auth/identity/v3.py#n145 Change-Id: I007e0cfa726979a419808d47543a4260f8c3c584
This commit is contained in:
parent
c23fa19457
commit
01e955520c
|
@ -273,7 +273,7 @@ class Transport(requests.Session):
|
|||
except ValueError as e:
|
||||
# this may be simplejson.decode.JSONDecodeError
|
||||
# Re-raise into our own exception
|
||||
raise exceptions.InvalidResponse(response=resp.text)
|
||||
raise exceptions.InvalidResponse(response=resp)
|
||||
|
||||
return resp
|
||||
|
||||
|
|
Loading…
Reference in New Issue