Skip to content

chore: Fix usage of errors

Warren Gifford requested to merge ef/fix-errors into main

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

Merge request reports

Loading