chore: Fix usage of errors
Created by: efritz
There are several places where I used errors.Is(err, &want)
that are illegal, where want
is not something that can be successfully compared. This PR gets rid of these illegal uses.
Consistency check:
- use
errors.Is(...)
to compare anerr
value against a known constant error - use
errors.As(...)
to cast anerr
value into a specific type of known struct or interface (structs with fields, etc)