MCPcopy
hub / github.com/go-kit/kit / StatusCoder

Interface StatusCoder

transport/http/server.go:216–218  ·  view source on GitHub ↗

StatusCoder is checked by DefaultErrorEncoder. If an error value implements StatusCoder, the StatusCode will be used when encoding the error. By default, StatusInternalServerError (500) is used.

Source from the content-addressed store, hash-verified

214// StatusCoder, the StatusCode will be used when encoding the error. By default,
215// StatusInternalServerError (500) is used.
216type StatusCoder interface {
217 StatusCode() int
218}
219
220// Headerer is checked by DefaultErrorEncoder. If an error value implements
221// Headerer, the provided headers will be applied to the response writer, after

Callers 3

EncodeJSONResponseFunction · 0.65
DefaultErrorEncoderFunction · 0.65
EncodeProtoResponseFunction · 0.65

Implementers 5

AuthErrorauth/basic/middleware.go
enhancedResponsetransport/http/server_test.go
noContentResponsetransport/http/server_test.go
enhancedErrortransport/http/server_test.go
Cattransport/http/proto/proto_pb_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…