diff --git a/analysis/analysis.go b/analysis/analysis.go index 87129ceca1..e46618a93f 100644 --- a/analysis/analysis.go +++ b/analysis/analysis.go @@ -713,7 +713,7 @@ func (c *Controller) garbageCollectMeasurements(run *v1alpha1.AnalysisRun, measu resolvedArgsMetric, err := getResolvedMetricsWithoutSecrets(run.Spec.Metrics, run.Spec.Args) if err != nil { - return err + return fmt.Errorf("failed to resolve metrics during garbage collection: %w", err) } metricsByName := make(map[string]v1alpha1.Metric)