Documentation ¶
Overview ¶
Package errors defines some sensible defaults for jenny generated services
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var New = errors.New
New is the std lib errrors.New
Functions ¶
func DefaultErrorEncoder ¶
func DefaultErrorEncoder(ctx context.Context, err error, w http.ResponseWriter)
DefaultErrorEncoder is the default jenny encoder for errors. You can change this setting in the options package
func ErrorReporter ¶
func ErrorReporter(reporter Reporter, op string) endpoint.Middleware
ErrorReporter is a special middleware that works similary to the tracing middleware, it requires what the operationID should be inorder to report it's errors
Types ¶
type HTTPError ¶
type HTTPError interface { error kitthttp.StatusCoder }
HTTPError error is an interface to signal jenny whether a error should be displayed as is to the public or be obfuscated
func NewHTTPError ¶
NewHTTPError wraps an err with a HTTP status code
type NoopReporter ¶
type NoopReporter struct{}
NoopReporter is the default reporter, it does nothing
Click to show internal directories.
Click to hide internal directories.