Skip to content

Attach stack trace at every layer of every error being sent to Sentry

Created by: unknwon

In principle, we should always wrap errors at every layer because the producer of the error wouldn't and shouldn't be aware of how the error will be actually handled (e.g. render user-friendly message, report to Sentry). Attaching stack trace makes the debugging much more easier at the time it is needed.

There is of course extra overhead on capturing the stack traces at every layer while bubbling up errors. As for this, we're already not on the happy path, the second-best thing we can do is to provide as much information as possible for debugging.