Skip to content

fix(sentry): Filter third-party global handler noise with no stack frames#18340

Closed
cursor[bot] wants to merge 1 commit into
masterfrom
error-he-v3ulni
Closed

fix(sentry): Filter third-party global handler noise with no stack frames#18340
cursor[bot] wants to merge 1 commit into
masterfrom
error-he-v3ulni

Conversation

@cursor

@cursor cursor Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Filter out "Error: he" and similar noise from third-party/injected scripts (browser extensions) that the global window.onerror handler captures on the client.

Two-layer fix in src/instrumentation-client.ts:

  1. ignoreErrors: Added /^he$/ pattern to drop the specific minified "Error: he" message by name.
  2. beforeSend: Added a filter that drops any error event containing a single exception with zero stack frames. These events are never actionable — they originate from third-party code outside the instrumented Next.js bundle and provide no usable debugging information.

The existing thirdPartyErrorFilterIntegration (with drop-error-if-exclusively-contains-third-party-frames) already handles errors that have third-party frames. This fix closes the gap for errors with no frames at all.

Fixes DOCS-AVV

IS YOUR CHANGE URGENT?

  • None: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team
Open in Web Open in Cursor 

…ames

Add "^he$" to ignoreErrors to drop the specific minified "Error: he"
from browser extensions/injected scripts. Also add a beforeSend filter
that drops any error event with a single exception and zero stack
frames — these are never actionable and always originate from
third-party code outside the instrumented bundle.

The existing thirdPartyErrorFilterIntegration only handles errors with
third-party frames; this closes the gap for errors with no frames at
all.

Fixes DOCS-AVV
Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Building Building Preview, Comment Jun 9, 2026 10:38pm
sentry-docs Building Building Preview, Comment Jun 9, 2026 10:38pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants