Skip to content

Commit

Permalink
Merge pull request #673 from alexandear/refactor/remove-multipart-form
Browse files Browse the repository at this point in the history
refactor: simplify error handling for multipart form reading
  • Loading branch information
danielgtaylor authored Dec 9, 2024
2 parents 1a01022 + 7b2fa2c commit b984c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion huma.go
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ func Register[I, O any](api API, op Operation, handler func(context.Context, *I)

if rawBodyMultipart || rawBodyDecodedMultipart {
form, err := ctx.GetMultipartForm()
if err != nil || form == nil {
if err != nil {
res.Errors = append(res.Errors, &ErrorDetail{
Location: "body",
Message: "cannot read multipart form: " + err.Error(),
Expand Down

0 comments on commit b984c8a

Please sign in to comment.