Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,18 @@ export function getRouter() {
errorMessage.includes('null is not an object') ||
errorMessage.includes('is not a function')

if (hasAdScriptFrame && hasExpectedErrorMessage) {
// Some ad script errors (e.g. Publift Fuse cross-origin iframe errors) have
// highly specific message patterns that identify them unambiguously, even when
// the stack trace has been obscured by Sentry's sentryWrapped helper and no
// ad-script frame is visible. Suppress these directly by message alone.
const isUnambiguousAdScriptError =
errorMessage.includes('window.top.document') ||
errorMessage.includes('isPlacementXdom')

if (
isUnambiguousAdScriptError ||
(hasAdScriptFrame && hasExpectedErrorMessage)
) {
// Suppress the error - log to console in debug mode
console.debug(
'Suppressed Publift Fuse/ad script error:',
Expand Down
Loading