Skip to content

Commit

Permalink
Use StatusInternalServerError instead of StatusUnprocessableEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
mpalmi committed Aug 30, 2023
1 parent d890ed4 commit e59b252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func rateLimitQuotaWrapping(handler http.Handler, core *vault.Core) http.Handler
requiresResolveRole, err := core.ResolveRoleForQuotas(r.Context(), quotaReq)
if err != nil {
core.Logger().Error("failed to lookup quotas", "path", path, "error", err)
respondError(w, http.StatusUnprocessableEntity, err)
respondError(w, http.StatusInternalServerError, err)
return
}

Expand All @@ -86,7 +86,7 @@ func rateLimitQuotaWrapping(handler http.Handler, core *vault.Core) http.Handler
quotaResp, err := core.ApplyRateLimitQuota(r.Context(), quotaReq)
if err != nil {
core.Logger().Error("failed to apply quota", "path", path, "error", err)
respondError(w, http.StatusUnprocessableEntity, err)
respondError(w, http.StatusInternalServerError, err)
return
}

Expand Down

0 comments on commit e59b252

Please sign in to comment.