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
The errors from the appierrors package reflect known erroneous recoverable states that should not be logged with severity ERROR, they should be logged as INFO instead. We have introduced a small LogAndReturn utility to check whether an error is an ApiError and if true, log it as INFO, log it as ERROR otherwise. Let's use it everywhere in the shim where logging is done.
The only exception from apierrors being recoverable is the UnknownError. This error is only used to present unexpected and unknown errors and the shim code (handlers and repositories) are not expected to use it e.g. here. instead, they should just return the error without wrapping it with an UnknownError.
Having said that, we could consider making UnknownError private to wherever it is presented (currently here) so that we make sure it is not used elsewhere.
The text was updated successfully, but these errors were encountered:
The errors from the appierrors package reflect known erroneous recoverable states that should not be logged with severity
ERROR
, they should be logged asINFO
instead. We have introduced a smallLogAndReturn
utility to check whether an error is an ApiError and if true, log it as INFO, log it as ERROR otherwise. Let's use it everywhere in the shim where logging is done.The only exception from apierrors being recoverable is the
UnknownError
. This error is only used to present unexpected and unknown errors and the shim code (handlers and repositories) are not expected to use it e.g. here. instead, they should just return the error without wrapping it with anUnknownError
.Having said that, we could consider making
UnknownError
private to wherever it is presented (currently here) so that we make sure it is not used elsewhere.The text was updated successfully, but these errors were encountered: