MCPcopy
hub / github.com/danielgtaylor/huma / StatusError

Interface StatusError

error.go:148–151  ·  view source on GitHub ↗

StatusError is an error that has an HTTP status code. When returned from an operation handler, this sets the response status code before sending it to the client.

Source from the content-addressed store, hash-verified

146// an operation handler, this sets the response status code before sending it
147// to the client.
148type StatusError interface {
149 GetStatus() int
150 Error() string
151}
152
153// HeadersError is an error that has HTTP headers. When returned from an
154// operation handler, these headers are set on the response before sending it

Callers 16

TestErrorAsFunction · 0.95
RegisterFunction · 0.95
WriteErrFunction · 0.65
TestErrorResponsesFunction · 0.65
TestIfMatchFunction · 0.65
TestIfNoneMatchFunction · 0.65
TestIfModifiedSinceFunction · 0.65
TestIfUnmodifiedSinceFunction · 0.65
getAPIPrefixFunction · 0.65
TestCustomErrorFunction · 0.65
AddMethod · 0.65

Implementers 3

MyErrorhuma_test.go
ErrorModelerror.go
MyErrorexamples/custom-error/main.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…