Skip to content

Commit

Permalink
Merge pull request #61 from andyclegg/add-context-to-connection-failures
Browse files Browse the repository at this point in the history
Add target context to connection error
  • Loading branch information
iky authored Oct 24, 2023
2 parents af24427 + 5a610b8 commit 0c8c871
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion nameko_grpc/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def get(self):
def start(self):
self.run = True
for target in self.targets:
self.connect(urlparse(target))
try:
self.connect(urlparse(target))
except OSError as e:
raise type(e)(f"Failed to connect to {target}") from e

def stop(self):
self.run = False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name="nameko-grpc",
version="1.4.0rc2",
version="1.4.0rc3",
description="Nameko gRPC extensions",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 0c8c871

Please sign in to comment.