Add a missing StatusUnprocessableEntity HTTP response code

This commit is contained in:
jordi fita mas 2023-02-12 21:03:46 +01:00
parent c2d8006748
commit 72fbed68ac
1 changed files with 1 additions and 0 deletions

View File

@ -124,6 +124,7 @@ func HandleUpdateProduct(w http.ResponseWriter, r *http.Request, params httprout
return return
} }
if !form.Validate() { if !form.Validate() {
w.WriteHeader(http.StatusUnprocessableEntity)
mustRenderEditProductForm(w, r, form) mustRenderEditProductForm(w, r, form)
return return
} }