Package weberr based on https://github.com/pkg/errors with a few additions:
- Set an error type that corresponds to HTTP status returned by this error
- Set a user friendly error message (in addition to the error message that will be logged)
- Add arbitrary details to the error
go get github.com/zgalor/weberr
Read the package documentation for more information.
- We chose
weberr.Wrapf(nil, ...)
and similar wrapping functions should return a new error, whereaserrors.Wrapf(nil, ...)
historically returns nil.
BSD-2-Clause
[ awesome logo image by gophers... ]