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 some cases, like the example above and here, this can remove important error context from the output error message.
Ideas
I thought about creating my own RemediationError instead of using fmt.Errorf with wrapping, but that'd mean re-implementing the logic in Deduce (i.e. the Authentication error handling).
I think an approach would be extracting this logic into a standalone exported functions that package users can call. They could then add a prefix to the Remediation.Inner field.
The text was updated successfully, but these errors were encountered:
The
errors.Deduce
function drops important error information in certain cases.Example
Description
The
Deduce
function will unwrap any errors that wrap afastly.HTTPError
:cli/pkg/errors/deduce.go
Lines 24 to 33 in 92952d8
In some cases, like the example above and here, this can remove important error context from the output error message.
Ideas
RemediationError
instead of usingfmt.Errorf
with wrapping, but that'd mean re-implementing the logic inDeduce
(i.e. the Authentication error handling).Remediation.Inner
field.The text was updated successfully, but these errors were encountered: