tanstack.com
tanstack.com copied to clipboard
fix: Enhance Sentry error suppression for third-party ad scripts
Fixes TANSTACK-COM-19W. The issue was that: Sentry's History API instrumentation catches third-party script errors before the global window.onerror handler can suppress them.
- Implemented a
beforeSendhook in the Sentry configuration. - The hook filters out errors originating from third-party ad scripts (e.g., Publift Fuse, NoBid).
- Identifies ad script errors by checking specific filenames in stack traces and common error messages.
- Suppresses errors containing messages like 'contextWindow.parent', 'null is not an object', or 'is not a function' when originating from ad scripts.
- Adds debug logging to the console for filtered errors.
This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 8723837
Not quite right? Click here to continue debugging with Seer.