You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should switch all of our 'not found' style errors over to the go style of having typed errors. Where every 'not found' error has a NotFound() bool method on it, so that it can be type checked easily. This will fix tons of fragile if err == bstore.ErrNotFound type calls.
The main question here is whether or not to add a IsNotFoundErr(err) bool method in some help package, or reimplement as needed (its a one-liner). One thought I had here was that we could put this in our own custom errors package, (a wrapper around the pkg/errors package) and have that be used everywhere.
The text was updated successfully, but these errors were encountered:
We should switch all of our 'not found' style errors over to the go style of having typed errors. Where every 'not found' error has a
NotFound() bool
method on it, so that it can be type checked easily. This will fix tons of fragileif err == bstore.ErrNotFound
type calls.The main question here is whether or not to add a
IsNotFoundErr(err) bool
method in some help package, or reimplement as needed (its a one-liner). One thought I had here was that we could put this in our own custom errors package, (a wrapper around the pkg/errors package) and have that be used everywhere.The text was updated successfully, but these errors were encountered: