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

Function ServerErrorEncoder

transport/http/jsonrpc/server.go:72–74  ·  view source on GitHub ↗

ServerErrorEncoder is used to encode errors to the http.ResponseWriter whenever they're encountered in the processing of a request. Clients can use this to provide custom error formatting and response codes. By default, errors will be written with the DefaultErrorEncoder.

(ee httptransport.ErrorEncoder)

Source from the content-addressed store, hash-verified

70// use this to provide custom error formatting and response codes. By default,
71// errors will be written with the DefaultErrorEncoder.
72func ServerErrorEncoder(ee httptransport.ErrorEncoder) ServerOption {
73 return func(s *Server) { s.errorEncoder = ee }
74}
75
76// ServerErrorLogger is used to log non-terminal errors. By default, no errors
77// are logged. This is intended as a diagnostic measure. Finer-grained control

Callers 1

TestServerErrorEncoderFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestServerErrorEncoderFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…