Closed guneyizol closed 4 weeks ago
Hello ✋
Below code panics because both the response and the error are returned as nil. Is this a feature or a bug? IMHO handling this case gracefully would be better for UX.
Thanks 🙏
mux := http.NewServeMux() api := humago.New(mux, huma.DefaultConfig("My API", "1.0.0")) huma.Register( api, huma.Operation{ Method: http.MethodPost, Path: "/", }, func(ctx context.Context, input *Input) (*Output, error) { return nil, nil } )
@guneyizol thanks for reporting! I've thrown up a quick PR to fix this.
Hello ✋
Below code panics because both the response and the error are returned as nil. Is this a feature or a bug? IMHO handling this case gracefully would be better for UX.
Thanks 🙏