Closed rowanseymour closed 1 month ago
can use find and replace with regex for some of this...
errors\.Wrap\(err, "([^"]+)"\)
> fmt.Errorf("$1: %w", err)
Even better....
errors\.Wrapf?\(err, "([^"]+)"(.*)\)$
fmt.Errorf("$1: %w"$2, err)
BUT... errors.Wrap
and errors.Wrapf
return nil if passed a nil error... fmt.Errorf
doesn't... so you gotta look for cases where we were relying on that. You can find some with ^\treturn fmt\.Errorf\(
which are lines returning an err which aren't indented in an if
Yes, I suspect that is causing issues in backends/rapidpro
I will update that part in a second PR
Remove
github.com/pkg/errors
which is dead like in https://github.com/nyaruka/gocommon/pull/128 and https://github.com/nyaruka/goflow/pull/1258