Skip to content

Commit

Permalink
Remove unused error loop in sendform_mw.go
Browse files Browse the repository at this point in the history
  • Loading branch information
wneessen committed Sep 4, 2021
1 parent 9738f60 commit 3c4e96c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions api/sendform_mw.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ func (r *Route) SendFormReqFields(next echo.HandlerFunc) echo.HandlerFunc {
}
if len(invalidFields) > 0 {
c.Logger().Errorf("Form field validation failed: %s", strings.Join(invalidFields, ", "))
var errorMsg []string
for _, f := range invalidFields {
errorMsg = append(errorMsg, fmt.Sprintf("%s: %s", f, fieldError[f]))
}
return echo.NewHTTPError(http.StatusBadRequest, &response.ErrorObj{
Message: "fields(s) validation failed",
Data: fieldError,
Expand Down

0 comments on commit 3c4e96c

Please sign in to comment.