Skip to content

test: cover worker throwing primitive values#64365

Open
dobbydobap wants to merge 1 commit into
nodejs:mainfrom
dobbydobap:test-worker-error-primitive
Open

test: cover worker throwing primitive values#64365
dobbydobap wants to merge 1 commit into
nodejs:mainfrom
dobbydobap:test-worker-error-primitive

Conversation

@dobbydobap

Copy link
Copy Markdown

What this does: Adds a regression test asserting that when a worker throws a non-Error value (string, number, bigint, boolean, null, undefined), the parent's 'error' handler receives that value directly rather than a wrapped ERR_UNHANDLED_ERROR.

The behavior is already correct on main; this adds the missing coverage so #35506 can't regress.

How I tested: python tools/test.py test/parallel/test-worker-error-primitive.js → passes; also ran the file directly.

A worker that throws a non-Error value (string, number, bigint,
boolean, null, undefined) surfaces that value on the parent's
'error' handler. This was reported as a wrapped ERR_UNHANDLED_ERROR
and is now correct, but had no regression coverage.

Refs: nodejs#35506
Signed-off-by: dobbydobap <varshitha.kolupuri@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants