diff options
author | Gabriel Hurley <gabriel@strikeawe.com> | 2011-12-07 13:05:13 -0800 |
---|---|---|
committer | Gabriel Hurley <gabriel@strikeawe.com> | 2011-12-07 13:05:13 -0800 |
commit | 6c164d2fe01d4a7d2353967397287cc9fcc0c286 (patch) | |
tree | 486f525cd22c046152521843fc52e5d4ebb72341 /keystoneclient/exceptions.py | |
parent | 0c2a521974f0a074b2d6db0d8ce3fa33cf6f0105 (diff) | |
download | python-keystoneclient-6c164d2fe01d4a7d2353967397287cc9fcc0c286.tar.gz |
Improved error message when unable to communicate with keystone.
Diffstat (limited to 'keystoneclient/exceptions.py')
-rw-r--r-- | keystoneclient/exceptions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/keystoneclient/exceptions.py b/keystoneclient/exceptions.py index eeefe98..f52800d 100644 --- a/keystoneclient/exceptions.py +++ b/keystoneclient/exceptions.py @@ -123,7 +123,9 @@ def from_response(response, body): message = error.get('message', None) details = error.get('details', None) else: - message = body + # If we didn't get back a properly formed error message we + # probably couldn't communicate with Keystone at all. + message = "Unable to communicate with identity service: %s." % body details = None return cls(code=response.status, message=message, details=details) else: |