Skip to content

Commit

Permalink
fix: dont handle request body parsing errors in email restriction mid…
Browse files Browse the repository at this point in the history
…dleware
  • Loading branch information
kangmingtay committed Sep 27, 2024
1 parent 57356f7 commit 2d98019
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/api/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ func (a *API) isValidAuthorizedEmail(w http.ResponseWriter, req *http.Request) (
}

if err := retrieveRequestParams(req, &body); err != nil {
return ctx, err
// let downstream handlers handle the error
return ctx, nil
}
if body.Email == "" {
return ctx, nil
Expand Down

0 comments on commit 2d98019

Please sign in to comment.