Title: proxied `Error` instances return an undefined stack · Issue #60862 · nodejs/node · GitHub
Open Graph Title: proxied `Error` instances return an undefined stack · Issue #60862 · nodejs/node
X Title: proxied `Error` instances return an undefined stack · Issue #60862 · nodejs/node
Description: Version 24.11.1 Platform Darwin Mac.fritz.box 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030 arm64 Subsystem No response What steps will reproduce the bug? console.log( new ...
Open Graph Description: Version 24.11.1 Platform Darwin Mac.fritz.box 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030 arm64 Subsystem No response What steps w...
X Description: Version 24.11.1 Platform Darwin Mac.fritz.box 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030 arm64 Subsystem No response What steps w...
Opengraph URL: https://github.com/nodejs/node/issues/60862
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"proxied `Error` instances return an undefined stack","articleBody":"### Version\n\n24.11.1\n\n### Platform\n\n```text\nDarwin Mac.fritz.box 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030 arm64\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\n```js \nconsole.log(\n new Proxy(new Error(), {\n get(target, key, receiver) {\n // Need to return `target.stack` instead of `Reflect.get` starting with Node.js v21.0.0\n // when trying to get the `stack`.\n return Reflect.get(target, key, receiver);\n },\n }).stack\n);\n```\n\n### How often does it reproduce? Is there a required condition?\n\nalways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nA stacktrace is logged. `Reflect.get` is supposed to be equivalent to `target[propertyKey]`\n\n### What do you see instead?\n\n`undefined` is logged.\n\n### Additional information\n\nStarted with Node.js v21.0.0. Once I return `target.stack` from the Proxy getter, a stack is returned as usual. `Reflect.get(error, 'stack', receiver)` just doesn't work. Though it does work with `Reflect.get(error, 'stack')`","author":{"url":"https://github.com/eps1lon","@type":"Person","name":"eps1lon"},"datePublished":"2025-11-26T16:34:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/60862/node/issues/60862"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:374a2617-1e62-1435-68e3-903cd8864ece |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCE4:2E9C16:C85319:10D6D11:6A4C4685 |
| html-safe-nonce | febdbe8ddeb62cb9de564f19f720f9112fc1204b15edc1b7c777ad1349085555 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0U0OjJFOUMxNjpDODUzMTk6MTBENkQxMTo2QTRDNDY4NSIsInZpc2l0b3JfaWQiOiI0MTEwMDA1OTY5OTk1MTg3ODQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 988b873abff517f3f939fbb9ef60de815b15c9cacb06f1e08969a3c85c997d8b |
| hovercard-subject-tag | issue:3668236471 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/60862/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa7224359333a55754a8d8c96bf2a6b5f35078a2d1ef9bb9bf2ca6893184e8af/nodejs/node/issues/60862 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa7224359333a55754a8d8c96bf2a6b5f35078a2d1ef9bb9bf2ca6893184e8af/nodejs/node/issues/60862 |
| og:image:alt | Version 24.11.1 Platform Darwin Mac.fritz.box 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030 arm64 Subsystem No response What steps w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eps1lon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3996b3b83990e134be6c099ab9a7f48f140ae80f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width