fix: stop reporting transient WebSocket connect_error to Sentry

connect_error fires on every retry attempt (e.g. iOS Safari dropping
WebSocket during network transitions). Using logger.error routed each
attempt to Sentry.captureException, generating noise for a self-healing
failure. Switch to logger.log (no-op in production); the real failure
path (reconnect_failed) still uses logger.error and surfaces in Sentry.

https://claude.ai/code/session_01TpZ9W111Trkv2g4CkCWFpB
This commit is contained in:
Claude 2026-05-19 21:51:49 +00:00
parent 43dbdf0040
commit 28b89b3444
No known key found for this signature in database

View file

@ -64,7 +64,7 @@ export function useDraftSocket(seasonId: string, teamId?: string): UseDraftSocke
});
socket.on("connect_error", (error) => {
logger.error("Socket.IO connection error:", error);
logger.log("Socket.IO connection error:", error);
// Don't set connectionError here — reconnect_attempt fires immediately after
// and would clear it again, causing the error overlay to flicker on every
// retry. Only show a hard error once all attempts are exhausted (reconnect_failed).