(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestHTTPError_Error(t *testing.T) { |
| 26 | err := NewHTTPError(http.StatusNotFound, "not found") |
| 27 | assert.Equal(t, "code=404, message=not found", err.Error()) |
| 28 | |
| 29 | internalErr := errors.New("internal error") |
| 30 | err.SetInternal(internalErr) |
| 31 | assert.Equal(t, "code=404, message=not found, internal=internal error", err.Error()) |
| 32 | } |
| 33 | |
| 34 | func TestHTTPError_Unwrap(t *testing.T) { |
| 35 | internalErr := errors.New("internal error") |
nothing calls this directly
no test coverage detected