diff --git a/controllers/remote/cluster_cache_tracker.go b/controllers/remote/cluster_cache_tracker.go index 5a182fc84f80..fe6dfe4f20a7 100644 --- a/controllers/remote/cluster_cache_tracker.go +++ b/controllers/remote/cluster_cache_tracker.go @@ -266,7 +266,7 @@ func (t *ClusterCacheTracker) newClusterAccessor(ctx context.Context, cluster cl // Start the cache!!! go cache.Start(cacheCtx) //nolint:errcheck if !cache.WaitForCacheSync(cacheCtx) { - return nil, fmt.Errorf("failed waiting for cache for remote cluster %v to sync: %w", cluster, err) + return nil, fmt.Errorf("failed waiting for cache for remote cluster %v to sync: %w", cluster, cacheCtx.Err()) } // Start cluster healthcheck!!!