From e59b252bc091ecb74f1a346aca156f144feb84df Mon Sep 17 00:00:00 2001 From: Mike Palmiotto Date: Wed, 30 Aug 2023 09:25:10 -0400 Subject: [PATCH] Use StatusInternalServerError instead of StatusUnprocessableEntity --- http/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/util.go b/http/util.go index 0901616ee3ee..fadac4f4ad31 100644 --- a/http/util.go +++ b/http/util.go @@ -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 } @@ -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 }