api0(fix) incorrect status code
This commit is contained in:
parent
e399fe0da7
commit
ce1ca84d94
|
@ -39,7 +39,7 @@ func getAllProducts(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
products, err := lgc.GetAllProducts()
|
||||
if err != nil {
|
||||
respondWithError(w, http.StatusBadRequest, err)
|
||||
respondWithError(w, http.StatusInternalServerError, err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ func getAllTags(w http.ResponseWriter, r *http.Request) {
|
|||
tags, err := lgc.GetAllProductTags()
|
||||
|
||||
if err != nil {
|
||||
respondWithError(w, http.StatusBadRequest, err)
|
||||
respondWithError(w, http.StatusInternalServerError, err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue