From c558a3ff7fdcb2ffc0b3b370e998b5d10ea1362a Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Thu, 22 Jun 2023 13:04:19 -0400 Subject: [PATCH] chore: wrap error for easier debugging Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- pkg/engine/engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 70a5ecf36..7d273a817 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -59,7 +59,7 @@ func NewEngine(config *rest.Config, clusterCache cache.ClusterCache, opts ...Opt func (e *gitOpsEngine) Run() (StopFunc, error) { err := e.cache.EnsureSynced() if err != nil { - return nil, err + return nil, fmt.Errorf("failed to ensure the cluster cache is synced: %w", err) } return func() {