MCPcopy
hub / github.com/benbjohnson/wtf / FromErrorStatusCode

Function FromErrorStatusCode

http/http.go:162–169  ·  view source on GitHub ↗

FromErrorStatusCode returns the associated WTF code for an HTTP status code.

(code int)

Source from the content-addressed store, hash-verified

160
161// FromErrorStatusCode returns the associated WTF code for an HTTP status code.
162func FromErrorStatusCode(code int) string {
163 for k, v := range codes {
164 if v == code {
165 return k
166 }
167 }
168 return wtf.EINTERNAL
169}

Callers 1

parseResponseErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected