Clean up Rollbar noise from the deferred error-reporting listeners - #3620
Merged
Conversation
The deferred-Rollbar refactor (#3568) added an `unhandledrejection` window listener that forwarded `event.reason` as Rollbar's sole argument. On public instances rejections are dominated by wallet-extension / third-party noise with `null`/bare-object reasons, which Rollbar cannot turn into a message — it files empty "Item sent with null or missing arguments." occurrences (Rollbar item #25, 160+ occurrences). Remove the `unhandledrejection` listener: this matches pre-refactor behavior (the app never reported unhandled rejections before) and loses nothing — genuine page crashes surface as `critical` via the React error boundary. Guard the remaining `error` listener so a non-Error/non-string thrown value becomes a titled message + the raw value as custom data, closing the same empty-item hole on that path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The uncaught-error window listener added in #3568 surfaces cross-origin "Script error." events — the browser masks details of errors thrown by different-origin third-party scripts (GA, walletconnect, etc.), leaving only that string with no stack or payload. They are unactionable and were never reported before the deferred-Rollbar refactor. Add "Script error" to `ignoredMessages` (the existing 'cross-origin' entry does not match this literal string), dropping the noise while the listener still captures genuine same-origin uncaught errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Description
Cleans up two sources of unactionable Rollbar noise introduced by the deferred-Rollbar refactor (#3568), which added early
unhandledrejectionanderrorwindow listeners that the app never had before.unhandledrejectionlistener forwardedevent.reasonas Rollbar's only argument; on public instances rejections are dominated by browser-extension / third-party noise withnullor bare-object reasons that Rollbar can't turn into a message, so it files empty items (160+ occurrences on one item). The listener is removed — matching pre-refactor behavior (unhandled rejections were never reported before) with no loss of coverage, since genuine page crashes are reported ascriticalthrough the React error boundary. The remaining uncaught-errorlistener is guarded so a non-Error/non-string thrown value becomes a titled message with the raw value preserved as custom data, closing the same hole on that path.errorlistener surfaces cross-origin script errors, which the browser masks to the bare string"Script error."with no stack or payload (a CORS measure), sourced from third-party scripts we don't control."Script error"is added toignoredMessages(the existing'cross-origin'entry doesn't match this literal string), keeping the listener's value for genuine same-origin uncaught errors.Environment variables
None
Minimum API version
None
Breaking or incompatible changes
None
Additional information
Unit tests in
src/services/rollbar/queue.spec.tscover the guardederror-listener paths (non-Error thrown value → fallback message + custom data;nullerror → falls back to the event message).🤖 Generated with Claude Code