Better error chaining is finally in JavaScript 🔗
`Error.cause` lets you attach the original error when rethrowing, keeping full context without losing the stack.
Learn more 👇
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
MDN Web Docs
@mdn@mastodon.social
The official MDN Web Docs account. We deliver the best web docs around. Visit → https://mdn.dev Contribute → https://mdn.dev/community
mastodon.social
MDN Web Docs
@mdn@mastodon.social
The official MDN Web Docs account. We deliver the best web docs around. Visit → https://mdn.dev Contribute → https://mdn.dev/community
mastodon.social
@mdn@mastodon.social
·
Mar 13, 2026
12
0
2
Loading comments...