Skip to content

Commit

Permalink
fix: use error present in more Go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgtaylor committed Mar 5, 2024
1 parent b9af8c8 commit dd90062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions huma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ func TestFeatures(t *testing.T) {
Name: "response-transform-error",
Transformers: []huma.Transformer{
func(ctx huma.Context, status string, v any) (any, error) {
return nil, errors.ErrUnsupported
return nil, http.ErrNotSupported
},
},
Register: func(t *testing.T, api huma.API) {
Expand All @@ -714,7 +714,7 @@ func TestFeatures(t *testing.T) {
if err := recover(); err != nil {
// Ensure the error is the one we expect, possibly wrapped with
// additional info.
assert.ErrorIs(t, err.(error), errors.ErrUnsupported)
assert.ErrorIs(t, err.(error), http.ErrNotSupported)
}
called = true
}()
Expand Down

0 comments on commit dd90062

Please sign in to comment.