fix(signalr): do not show exception to client

This commit is contained in:
MingxuanGame
2025-08-17 16:43:19 +00:00
parent 103ce7b2e5
commit 05aef00512

View File

@@ -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(