From 2381e216e421379f9cbb70c372fcdefe32b7cc58 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Sat, 24 Jan 2026 17:49:25 +0100 Subject: [PATCH] Fix validator message with warn (#5168) --- shared/auth/jwt/validator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/auth/jwt/validator.go b/shared/auth/jwt/validator.go index ede7acea5..aeaa5842c 100644 --- a/shared/auth/jwt/validator.go +++ b/shared/auth/jwt/validator.go @@ -72,8 +72,8 @@ var ( func NewValidator(issuer string, audienceList []string, keysLocation string, idpSignkeyRefreshEnabled bool) *Validator { keys, err := getPemKeys(keysLocation) - if err != nil { - log.WithField("keysLocation", keysLocation).Errorf("could not get keys from location: %s", err) + if err != nil && !strings.Contains(keysLocation, "localhost") { + log.WithField("keysLocation", keysLocation).Warnf("could not get keys from location: %s, it will try again on the next http request", err) } return &Validator{