You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In getErrorMessage, which is used to create a pretty error messages that is both logged and returned to clients in non-production environments, the error message is found by simply taking err.stack.
Errors now support the cause option (not really well-documented in Node.js documentation, but it's on MDN), which allows listing originating causes for an error (for example, if an error is thrown as the result of a different error).
err.stack does not print this, but for example browser consoles show the causes nicely:
Would you be interested in a PR adding the cause chain to the output of getErrorMessage? I think this would be a nice addition, and I would personally find it useful 😄
The text was updated successfully, but these errors were encountered:
In
getErrorMessage
, which is used to create a pretty error messages that is both logged and returned to clients in non-production environments, the error message is found by simply takingerr.stack
.Errors now support the
cause
option (not really well-documented in Node.js documentation, but it's on MDN), which allows listing originating causes for an error (for example, if an error is thrown as the result of a different error).err.stack
does not print this, but for example browser consoles show the causes nicely:Would you be interested in a PR adding the cause chain to the output of
getErrorMessage
? I think this would be a nice addition, and I would personally find it useful 😄The text was updated successfully, but these errors were encountered: