httperr is a Go package for HTTP/API errors with status codes and much more...
- Comprehensive helper functions for new errors (e.g.
NewBadRequestError()and many more) - Status code
- Errors with stack trace
- Cause, additional headers and reasons support
- Support for
errors.Unwrap Wrapfunction - with pluggable support for wrapped error to status code resolution- Configurable (and pluggable) error writer
- Pluggable formatting
go get github.com/go-andiamo/httperr