Closed
Description
Is your feature request related to a problem? Please describe.
Wrapping/enhancing errors with more context is complicated in JavaScript, while it's supported in multiple languages (like Java)
Describe the solution you'd like
Implement this stage-3 error cause proposal: https://github.com/tc39/proposal-error-cause
It's also worth making sure that logging an error with a causal chain logs the full causal chain recursively by default: this would make it easier to find the root cause of a bug without requiring the user to loop over the causal chain.
@mcollina suggested to open an issue
Describe alternatives you've considered
Using a custom non-std error library, but this would only work in my own code.