diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-02-22 16:06:34 -0500 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-02-22 16:06:34 -0500 |
commit | 3ce3fe80cb771c6d6082d9fac4986d7b5d09ab6a (patch) | |
tree | 84aad94380ffd2ae4282052a19996a8cecc68b67 /keystoneclient/service_catalog.py | |
parent | 58cb347cfa9b48a8464ebb384a93b1cb3edd4578 (diff) | |
download | python-keystoneclient-3ce3fe80cb771c6d6082d9fac4986d7b5d09ab6a.tar.gz |
Improve error message for missing endpoint
Horizon logs an error when it wants an endpoint
that the client can't find, but the error does not
say which endpoint is missing. This change includes
more details in the error message to make debugging
from the horizon logs easier.
Change-Id: I6f0aacd469500238f13a2178a220268d86d31fe5
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Diffstat (limited to 'keystoneclient/service_catalog.py')
-rw-r--r-- | keystoneclient/service_catalog.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/keystoneclient/service_catalog.py b/keystoneclient/service_catalog.py index 5b179d9..c57e68e 100644 --- a/keystoneclient/service_catalog.py +++ b/keystoneclient/service_catalog.py @@ -77,7 +77,8 @@ class ServiceCatalog(object): if not filter_value or endpoint.get(attr) == filter_value: return endpoint[endpoint_type] - raise exceptions.EndpointNotFound('Endpoint not found.') + raise exceptions.EndpointNotFound('%s endpoint for %s not found.' % + (endpoint_type, service_type)) def get_endpoints(self, service_type=None, endpoint_type=None): """Fetch and filter endpoints for the specified service(s). |