Skip to content

Commit 741e5e7

Browse files
iHiDclaude
andauthored
Filter non-actionable network fetch errors from Sentry (#8424)
Drop "NetworkError when attempting to fetch resource" (Firefox) and "Failed to fetch" (Chrome/Safari) from Sentry reports. These are transient network errors caused by connectivity loss, DNS failures, or browser extensions — not actionable application bugs. Closes #8417 Closes #8388 Closes #8387 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0f1a5ac commit 741e5e7

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

app/javascript/utils/react-bootloader.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ if (process.env.SENTRY_DSN) {
6868
)
6969
if (isFrameNotReadyError) return null
7070

71+
// Drop non-actionable network errors (connectivity loss, DNS failures, browser extensions blocking requests)
72+
const isNetworkError = event.exception?.values?.some(
73+
(ex) =>
74+
ex.value?.includes(
75+
'NetworkError when attempting to fetch resource'
76+
) || ex.value?.includes('Failed to fetch')
77+
)
78+
if (isNetworkError) return null
79+
7180
const tag = document.querySelector<HTMLMetaElement>(
7281
'meta[name="user-id"]'
7382
)

0 commit comments

Comments
 (0)