From 90b7a7557b6c0de047876e81df5ab6fd8aa06c22 Mon Sep 17 00:00:00 2001 From: Xiangjing Li <55890329+xiangjingli@users.noreply.github.com> Date: Mon, 29 Jul 2024 19:44:20 -0400 Subject: [PATCH] avoid error status accumulation when failing to fetch hub channel (#408) Signed-off-by: Xiangjing Li --- pkg/controller/subscription/subscription_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/subscription/subscription_controller.go b/pkg/controller/subscription/subscription_controller.go index d2dec453..b1350dab 100644 --- a/pkg/controller/subscription/subscription_controller.go +++ b/pkg/controller/subscription/subscription_controller.go @@ -337,7 +337,7 @@ func (r *ReconcileSubscription) doReconcile(instance *appv1.Subscription) error err = r.hubclient.Get(context.TODO(), chnkey, subitem.Channel) if err != nil { - return gerr.Wrapf(err, "failed to get channel of subscription %v", instance) + return gerr.Wrap(err, "failed to get channel") } } @@ -351,7 +351,7 @@ func (r *ReconcileSubscription) doReconcile(instance *appv1.Subscription) error err = r.hubclient.Get(context.TODO(), scndChnkey, subitem.SecondaryChannel) if err != nil { - return gerr.Wrapf(err, "failed to get the secondary channel of subscription %v", instance) + return gerr.Wrap(err, "failed to get the secondary channel") } } }