Skip to content

Commit e695f4a

Browse files
iHiDclaude
andauthored
Filter non-actionable "Failed to load Stripe.js" errors from Sentry (#8620) (#8625)
Ad blockers, privacy extensions, and network issues can prevent the Stripe.js script from loading. Users already see a friendly fallback message in the UI, so these errors are not actionable. Filter them in the beforeSend hook alongside the other non-actionable error categories. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 89b85fa commit e695f4a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

app/javascript/utils/react-bootloader.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ if (process.env.SENTRY_DSN) {
138138
ex.value?.includes("read the 'sessionStorage' property from 'Window'")
139139
)
140140
if (isStorageAccessError) return null
141-
141+
142142
// Drop non-actionable "Maximum call stack size exceeded" errors.
143143
// These come from browser extensions, third-party scripts, or users
144144
// with cached bundles (the root cause in app code was fixed in #8408).
@@ -151,6 +151,14 @@ if (process.env.SENTRY_DSN) {
151151
)
152152
if (isStackOverflowError) return null
153153

154+
// Drop non-actionable Stripe.js loading failures (ad blockers,
155+
// privacy extensions, or network issues preventing the script from loading).
156+
// Users already see a friendly fallback message in the UI.
157+
const isStripeLoadError = event.exception?.values?.some((ex) =>
158+
ex.value?.includes('Failed to load Stripe.js')
159+
)
160+
if (isStripeLoadError) return null
161+
154162
const tag = document.querySelector<HTMLMetaElement>(
155163
'meta[name="user-id"]'
156164
)

0 commit comments

Comments
 (0)