Smarter ErrNotFound
Open
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.