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

Function TestHTTPError_Unwrap

error_test.go:34–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32}
33
34func TestHTTPError_Unwrap(t *testing.T) {
35 internalErr := errors.New("internal error")
36 err := NewHTTPError(http.StatusInternalServerError, "server error").SetInternal(internalErr)
37 assert.Equal(t, internalErr, err.Unwrap())
38}
39
40func TestDefaultErrHandlerFunc(t *testing.T) {
41 rec := httptest.NewRecorder()

Callers

nothing calls this directly

Calls 3

NewHTTPErrorFunction · 0.85
SetInternalMethod · 0.80
UnwrapMethod · 0.65

Tested by

no test coverage detected