MCPcopy
hub / github.com/grafana/dskit / ErrorHandler

Struct ErrorHandler

middleware/errorhandler.go:22–25  ·  middleware/errorhandler.go::ErrorHandler

ErrorHandler lets you call an alternate http handler upon a certain response code. Note it will assume a 200 if the wrapped handler does not write anything

Source from the content-addressed store, hash-verified

20// ErrorHandler lets you call an alternate http handler upon a certain response code.
21// Note it will assume a 200 if the wrapped handler does not write anything
22type ErrorHandler struct {
23 Code int
24 Handler http.Handler
25}
26
27// Wrap implements Middleware
28func (e ErrorHandler) Wrap(next http.Handler) http.Handler {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected