From 05aef00512585d7faee191dfb351d7f616792a9a Mon Sep 17 00:00:00 2001 From: MingxuanGame Date: Sun, 17 Aug 2025 16:43:19 +0000 Subject: [PATCH] fix(signalr): do not show exception to client --- app/signalr/hub/hub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/signalr/hub/hub.py b/app/signalr/hub/hub.py index 4d9906c..cfa4739 100644 --- a/app/signalr/hub/hub.py +++ b/app/signalr/hub/hub.py @@ -277,12 +277,12 @@ class Hub[TState: UserState]: f"Client {client.connection_token} call {packet.target}" f" failed: {error}" ) - except Exception as e: + except Exception: logger.exception( f"Error invoking method {packet.target} for " f"client {client.connection_id}" ) - error = str(e) + error = "Unknown error occured in server" if packet.invocation_id is not None: await client.send_packet( CompletionPacket(