MCPcopy Create free account
hub / github.com/aeilang/httpz / Error

Method Error

error.go:50–55  ·  view source on GitHub ↗

Error returns the error message for the HTTPError.

()

Source from the content-addressed store, hash-verified

48
49// Error returns the error message for the HTTPError.
50func (e *HTTPError) Error() string {
51 if e.Internal == nil {
52 return fmt.Sprintf("code=%d, message=%v", e.StatusCode, e.Msg)
53 }
54 return fmt.Sprintf("code=%d, message=%v, internal=%v", e.StatusCode, e.Msg, e.Internal)
55}
56
57// Unwrap returns the internal error of the HTTPError.
58func (e *HTTPError) Unwrap() error {

Callers 12

TestHTTPError_ErrorFunction · 0.95
BindPathParamsFunction · 0.80
BindQueryParamsFunction · 0.80
BindBodyFunction · 0.80
BindHeadersFunction · 0.80
TestBindFormFunction · 0.80
DefaultErrHandlerFuncFunction · 0.80
TestContentEncodingFunction · 0.80
ThrottleWithOptsFunction · 0.80

Calls

no outgoing calls

Tested by 6

TestHTTPError_ErrorFunction · 0.76
TestBindFormFunction · 0.64
TestContentEncodingFunction · 0.64