Improve error message
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/00efcf2b Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/00efcf2b Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/00efcf2b Branch: refs/heads/trunk Commit: 00efcf2be242acfa8821dec7c2ec14537a5f9584 Parents: 7deee73 Author: micafer <[email protected]> Authored: Wed Nov 29 13:51:18 2017 +0100 Committer: micafer <[email protected]> Committed: Wed Nov 29 13:51:18 2017 +0100 ---------------------------------------------------------------------- libcloud/common/openstack_identity.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/00efcf2b/libcloud/common/openstack_identity.py ---------------------------------------------------------------------- diff --git a/libcloud/common/openstack_identity.py b/libcloud/common/openstack_identity.py index 102e2e0..966c12b 100644 --- a/libcloud/common/openstack_identity.py +++ b/libcloud/common/openstack_identity.py @@ -1518,7 +1518,8 @@ class OpenStackIdentity_3_0_Connection_OIDC_access_token( driver=self.driver) else: raise MalformedResponseError('Malformed response', - driver=self.driver) + driver=self.driver, + body=response.body) def _get_project_id(self, token): """ @@ -1542,7 +1543,8 @@ class OpenStackIdentity_3_0_Connection_OIDC_access_token( raise MalformedResponseError('Failed to parse JSON', e) else: raise MalformedResponseError('Malformed response', - driver=self.driver) + driver=self.driver, + body=response.body) class OpenStackIdentity_2_0_Connection_VOMS(OpenStackIdentityConnection, @@ -1622,7 +1624,8 @@ class OpenStackIdentity_2_0_Connection_VOMS(OpenStackIdentityConnection, raise MalformedResponseError('Failed to parse JSON', e) else: raise MalformedResponseError('Malformed response', - driver=self.driver) + driver=self.driver, + body=response.body) def _get_tenant_name(self, token): """ @@ -1645,7 +1648,8 @@ class OpenStackIdentity_2_0_Connection_VOMS(OpenStackIdentityConnection, raise MalformedResponseError('Failed to parse JSON', e) else: raise MalformedResponseError('Malformed response', - driver=self.driver) + driver=self.driver, + body=response.body) def _authenticate_2_0_with_body(self, reqbody): resp = self.request('/v2.0/tokens', data=reqbody,
