diff --git a/internal/client/client.go b/internal/client/client.go index 36cc63fc87..ba91b8f1b3 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -546,9 +546,9 @@ func (a *APIClient) SwitchContext(name string) error { return err } if a.getConnOK() { - if err := a.invalidateCache(); err != nil { - return err - } + log.Debug().Msgf("No cache to invalidate") + } else if err := a.invalidateCache(); err != nil { + return err } a.reset() ResetMetrics()