Filter Browser Extension Errors from Client Error Reports#1515
Open
bobular wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[This is a largely Claude-generated PR.]
Problem
We've been receiving client error reports for errors that don't originate from our application code. For example, errors related to "Zotero" (a browser extension for managing citations) have been appearing in our error logs, even though Zotero is not part of our codebase (frontend or backend).
These errors come from:
This noise makes it harder to identify and fix genuine application errors.
Solution
Added filtering logic to
UnhandledErrorStoreModule.tsthat detects and excludes third-party errors before they're reported to the server.Changes Made
File:
packages/libs/wdk-client/src/StoreModules/UnhandledErrorStoreModule.tsNew
isThirdPartyError()function - Detects browser extension and third-party errors by checking:chrome-extension://,moz-extension://,safari-extension://)Updated error event listeners - Both the promise rejection handler and global error handler now filter out third-party errors before creating error reports
What Gets Filtered
✅ Browser extensions (Zotero, LastPass, Grammarly, ad blockers, etc.)
✅ Third-party scripts from external domains/CDNs
✅ Cross-origin errors that don't come from our application
What Still Gets Reported
✅ All genuine application errors from our own codebase
✅ Errors from our same-origin scripts
✅ All previously-filtered errors (ResizeObserver, WebGL, etc.)
Testing
Impact
After deployment, we should see a significant reduction in false-positive error reports. This will improve:
Future Enhancements
If we identify specific extension error patterns in production logs, we can easily add them to the filtering logic.