From 3ce3fe80cb771c6d6082d9fac4986d7b5d09ab6a Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 22 Feb 2013 16:06:34 -0500 Subject: [PATCH] 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 --- keystoneclient/service_catalog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keystoneclient/service_catalog.py b/keystoneclient/service_catalog.py index 5b179d969..c57e68ea5 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).