Make ConnectionRefused error more informative.
When the server refuses the connection the error message displayed now lists the endpoint that refused the connection. Fixes: bug 1043067 Change-Id: I62797106732bbb6eec8c99e491fd38850ad58ff8
This commit is contained in:
@@ -140,7 +140,8 @@ class HTTPClient(object):
|
||||
message = "Error finding address for %(url)s: %(e)s" % locals()
|
||||
raise exc.InvalidEndpoint(message=message)
|
||||
except (socket.error, socket.timeout) as e:
|
||||
message = "Error communicating with %(url)s: %(e)s" % locals()
|
||||
endpoint = self.endpoint
|
||||
message = "Error communicating with %(endpoint)s %(e)s" % locals()
|
||||
raise exc.CommunicationError(message=message)
|
||||
|
||||
body_iter = ResponseBodyIterator(resp)
|
||||
|
||||
Reference in New Issue
Block a user