MCPcopy Create free account
hub / github.com/abemedia/go-don / StatusCode

Method StatusCode

errors.go:43–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43func (e *HTTPError) StatusCode() int {
44 if e.code != 0 {
45 return e.code
46 }
47
48 var sc StatusCoder
49 if errors.As(e.err, &sc) {
50 return sc.StatusCode()
51 }
52
53 return fasthttp.StatusInternalServerError
54}
55
56func (e *HTTPError) MarshalText() ([]byte, error) {
57 var m encoding.TextMarshaler

Callers

nothing calls this directly

Calls 1

StatusCodeMethod · 0.95

Tested by

no test coverage detected