Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit cb37838

Browse files
committed
logging: don't log raw event on exception
Signed-off-by: Sumner Evans <[email protected]>
1 parent 6b2004a commit cb37838

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linkedin_messaging/linkedin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ async def _fire(self, payload_key: str, event: Any):
556556
try:
557557
await listener(event)
558558
except Exception:
559-
logging.exception(f"Listener {listener} failed to handle {event}")
559+
logging.exception(f"Listener {listener} failed to handle {type(event)}")
560560

561561
async def _listen_to_event_stream(self):
562562
logging.info("Starting event stream listener")
@@ -592,7 +592,7 @@ async def _listen_to_event_stream(self):
592592
try:
593593
await handler(data)
594594
except Exception:
595-
logging.exception(f"Handler {handler} failed to handle {data}")
595+
logging.exception(f"Handler {handler} failed to handle {type(data)}")
596596

597597
if cc := data.get("com.linkedin.realtimefrontend.ClientConnection", {}):
598598
logging.info(f"Got realtime connection ID: {cc.get('id')}")

0 commit comments

Comments
 (0)