switched to 400er for not providing the required input

This commit is contained in:
2023-12-15 19:39:05 +01:00
parent 98b4e8f818
commit 94a506ab7b
2 changed files with 5 additions and 5 deletions

8
api.go
View File

@@ -102,15 +102,15 @@ func GetPackages(w http.ResponseWriter, r *http.Request) {
offset, err := strconv.Atoi(r.URL.Query().Get("offset"))
if err != nil {
log.Warningf("error parsing page: %v", err)
render.Status(r, http.StatusInternalServerError)
log.Debugf("error parsing page: %v", err)
render.Status(r, http.StatusBadRequest)
return
}
limit, err := strconv.Atoi(r.URL.Query().Get("limit"))
if err != nil {
log.Warningf("error parsing page: %v", err)
render.Status(r, http.StatusInternalServerError)
log.Debugf("error parsing page: %v", err)
render.Status(r, http.StatusBadRequest)
return
}