From 035bef4111a5bf6573eacec61c7f76b0e79eb9d8 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Fri, 14 Aug 2026 17:20:10 +0530 Subject: [PATCH] Log invalid APIKey on API failures. (#4762) Useful to understand which key is used. --- pkg/service/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/service/auth.go b/pkg/service/auth.go index 3fcc1ce49..9d8c1e921 100644 --- a/pkg/service/auth.go +++ b/pkg/service/auth.go @@ -89,7 +89,7 @@ func (m *APIKeyAuthMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request, secret := m.provider.GetSecret(v.APIKey()) if secret == "" { - HandleError(w, r, http.StatusUnauthorized, ErrInvalidAPIKey) + HandleError(w, r, http.StatusUnauthorized, ErrInvalidAPIKey, "apiKey", v.APIKey()) return }