46
// ErrorToFailure implements FailureConverter.
47
// nolint:revive // Keeping all of the logic together for readability, even if it means the function is long.
48
>
func (e knownErrorFailureConverter) ErrorToFailure(err error) (nexus.Failure, error) {
failure_converter.go
49
>
if err == nil {
50
return nexus.Failure{}, nil
51
}
52
// NOTE: not using errors.Unwrap here we are intentionally only supporting unwrapping known errors.
54
case *nexus.FailureError:
55
f := typedErr.Failure