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

Function TestHTTPError_SetInternal

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

Source from the content-addressed store, hash-verified

17}
18
19func TestHTTPError_SetInternal(t *testing.T) {
20 internalErr := errors.New("internal error")
21 err := NewHTTPError(http.StatusInternalServerError, "server error").SetInternal(internalErr)
22 assert.Equal(t, internalErr, err.Internal)
23}
24
25func TestHTTPError_Error(t *testing.T) {
26 err := NewHTTPError(http.StatusNotFound, "not found")

Callers

nothing calls this directly

Calls 2

NewHTTPErrorFunction · 0.85
SetInternalMethod · 0.80

Tested by

no test coverage detected