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 anerrvalue against a known constant error - use
errors.As(...)to cast anerrvalue into a specific type of known struct or interface (structs with fields, etc)