Add support for Error cause field
twschiller opened this issue · comments
Todd Schiller commented
- Node and modern browsers support an optional "cause" field
- For debugging re-thrown errors, it would be great if rollbar.js would support the nested errors and properly include the causes in the payload/stack trace
Cyrus Radfar commented
@twschiller Can't make promises, atm, butI have been following the development of the Cause standard that's floating around.
Is this the proposal that you want us to support: https://tc39.es/proposal-error-cause/ [edited fixed link]
Todd Schiller commented
Thanks for the quick response @cyrusradfar. Yes, that link is for the stage 1 proposal
- IIRC: made it into the language: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-installerrorcause
- Archived Stage 4 proposal: https://github.com/tc39/proposal-error-cause
- Finished proposal tracking: https://github.com/tc39/proposals/blob/main/finished-proposals.md
Federico Brigante commented
@cyrusradfar I'd expect the .cause
chain to be displayed similarly to this:
Walt Jones commented
Released in 2.25.0. https://github.com/rollbar/rollbar.js/releases/tag/v2.25.0