Skip to content

fix: don't suppress non-LightSession unhandledrejection#17

Merged
11me merged 1 commit intomasterfrom
fix/light-session-7wz-unhandledrejection-filter
Feb 8, 2026
Merged

fix: don't suppress non-LightSession unhandledrejection#17
11me merged 1 commit intomasterfrom
fix/light-session-7wz-unhandledrejection-filter

Conversation

@11me
Copy link
Owner

@11me 11me commented Feb 8, 2026

Fixes bead light-session-7wz.

Problem: content script called preventDefault() for all window 'unhandledrejection' events, suppressing default DevTools reporting for unrelated site errors.

Change: only call preventDefault() when the rejection is clearly attributable to LightSession (extension URL in stack/message). Still logs LightSession-ish errors; does not mask site errors.

  • Adds filter helper: extension/src/content/rejection-filter.ts
  • Updates handler: extension/src/content/content.ts
  • Adds unit tests: tests/unit/rejection-filter.test.ts

Verification:

  • npm test
  • npm run lint
  • npm run build:chrome
  • Manual check in Brave via CDP :9222 that page-context rejections are still reported.

Only call preventDefault() for unhandledrejection events attributable to LightSession; keep site errors visible in DevTools. Adds a small filter helper + unit tests.
@11me 11me merged commit 63bc26b into master Feb 8, 2026
1 check passed
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.

1 participant