mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: Return error when retries have been exhausted for OAuth token refresh (#98034)
Return error when retries for DB lock have been exhausted in oauth_token.go
This commit is contained in:
@@ -98,6 +98,11 @@ func (s *OAuthTokenSync) SyncOauthTokenHook(ctx context.Context, id *authn.Ident
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if errors.Is(refreshErr, oauthtoken.ErrRetriesExhausted) {
|
||||
ctxLogger.Warn("Retries have been exhausted for locking the DB for OAuth token refresh", "id", id.ID, "error", refreshErr)
|
||||
return nil, refreshErr
|
||||
}
|
||||
|
||||
ctxLogger.Error("Failed to refresh OAuth access token", "id", id.ID, "error", refreshErr)
|
||||
|
||||
// log the user out
|
||||
|
||||
Reference in New Issue
Block a user