summaryrefslogtreecommitdiff
path: root/keystoneclient/exceptions.py
diff options
context:
space:
mode:
authorGabriel Hurley <gabriel@strikeawe.com>2011-12-07 13:05:13 -0800
committerGabriel Hurley <gabriel@strikeawe.com>2011-12-07 13:05:13 -0800
commit6c164d2fe01d4a7d2353967397287cc9fcc0c286 (patch)
tree486f525cd22c046152521843fc52e5d4ebb72341 /keystoneclient/exceptions.py
parent0c2a521974f0a074b2d6db0d8ce3fa33cf6f0105 (diff)
downloadpython-keystoneclient-6c164d2fe01d4a7d2353967397287cc9fcc0c286.tar.gz
Improved error message when unable to communicate with keystone.
Diffstat (limited to 'keystoneclient/exceptions.py')
-rw-r--r--keystoneclient/exceptions.py4
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: