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
{{ message }}
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
Returning errors from one layer to another in the code (eg: a repository error returned to a service, etc.) using errors.Wrapf(err, ...) is not sufficient, as the top-level error does not include the whole stacktrace, but just a set of messages attached together.
Having a proper stacktrace for each error is important as errors are collected on Sentry and without the stacktrace, it's hard to determine the location of the "root cause".
On the controller level, however, the error should be wrapped with a message that can be returned to the user (e.g.: "the action could not be performed"), but without passing the whole stacktrace nor the root cause.
The text was updated successfully, but these errors were encountered:
Returning errors from one layer to another in the code (eg: a repository error returned to a service, etc.) using
errors.Wrapf(err, ...)
is not sufficient, as the top-level error does not include the whole stacktrace, but just a set of messages attached together.Having a proper stacktrace for each error is important as errors are collected on Sentry and without the stacktrace, it's hard to determine the location of the "root cause".
On the controller level, however, the error should be wrapped with a message that can be returned to the user (e.g.: "the action could not be performed"), but without passing the whole stacktrace nor the root cause.
The text was updated successfully, but these errors were encountered: