Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nostr/relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ def _on_message(self, class_obj, message: str):
self.message_pool.add_message(message, self.url)

def _on_error(self, class_obj, error):
print("relay.py got error")
# Include the error detail + relay URL so a failure is actionable
# from logs alone — without this, downstream debugging had to
# resort to patching the library to surface the exception type.
print("relay.py got error for {}: {!r}".format(self.url, error))
self.connected = False
self.error_counter += 1
if self.error_threshold and self.error_counter > self.error_threshold:
Expand Down