fix log formatting

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2025-03-12 11:18:44 +01:00
commit 89330460e8
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -411,7 +411,7 @@ func checkAPIKeyAuth(tokenAuth *jwtauth.JWTAuth, scope dataprovider.APIKeyScope)
k, err := dataprovider.APIKeyExists(keyID)
if err != nil {
handleDefenderEventLoginFailed(util.GetIPFromRemoteAddress(r.RemoteAddr), util.NewRecordNotFoundError("invalid api key")) //nolint:errcheck
logger.Debug(logSender, "invalid api key %q: %v", apiKey, err)
logger.Debug(logSender, "", "invalid api key %q: %v", apiKey, err)
sendAPIResponse(w, r, errors.New("the provided api key is not valid"), "", http.StatusBadRequest)
return
}