Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Renegade334
Copy link
Member

The existing description in errors.md is outdated as of v21.x:

  • The hidden internal stack trace property is set at construct time, and is no longer lazily generated.
  • The accessors now perform a brand check, and do nothing if the this value passed to the getter/setter is not a native error.

This behaviour isn't mentioned in V8/Chromium documentation nor MDN, so it's worth spelling out here.

Error.isError() doesn't exist in v22.x, so this will need a specific PR referencing util.types.isNativeError() instead.

Refs: #60862

@Renegade334 Renegade334 added dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. labels Dec 16, 2025
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Dec 16, 2025
@aduh95
Copy link
Contributor

aduh95 commented Dec 17, 2025

Should we mention https://github.com/tc39/proposal-error-stack-accessor, which I think is what triggered the change in V8?

@Renegade334
Copy link
Member Author

@ljharb reckon this is mature enough to reference on our side?

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

Labels

backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. doc Issues and PRs related to the documentations. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. errors Issues and PRs related to JavaScript errors originated in Node.js core.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants