Skip to content

fix(config): capture unhandled error handler before scheduling - #7643

Open
jakezwang wants to merge 1 commit into
ReactiveX:7.xfrom
jakezwang:fix/capture-unhandled-error-handler
Open

jakezwang wants to merge 1 commit into
ReactiveX:7.xfrom
jakezwang:fix/capture-unhandled-error-handler

Conversation

@jakezwang

Copy link
Copy Markdown

Description:

Capture config.onUnhandledError when the error occurs, before scheduling its asynchronous delivery. Replacing or clearing the handler afterward should not redirect an already-reported error. If there was no handler, setting one later should not swallow that error.

This follows the core team's decision in #6436 (comment). This is a small fix targeted at 7.x; the current master branch is the separate RxJS Next implementation. The broader original PR #6436 was closed in favor of a focused fix.

Related issue: Fixes #7126.

Validation:

  • Three new regression tests fail before the change and pass afterward.
  • Full unit suite on Node 16 (the branch's CI runtime): 3,246 passed, 8 pending.
  • npm run lint, npm run compile, npm run dtslint, and focused Prettier check passed.
  • Node 26 also passes the new tests; two existing full-suite tests assume the older JSON parse error text and absence of a global WebSocket constructor, so the full suite was verified on Node 16.

Implementation and validation were performed primarily with OpenAI Codex.

Use the handler configured when an error occurs even if global configuration changes before asynchronous delivery.

Fixes ReactiveX#7126

Signed-off-by: Jake Wang <jakezwang@users.noreply.github.com>

This branch has not been deployed

No deployments
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