Skip to content

Commit 8ba8b73

Browse files
llxpschrej
authored andcommitted
adding err from handler.FetchPool to fmt.Errorf to not hide it
1 parent ac99c99 commit 8ba8b73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/ipamutil/reconciler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (r *ClaimReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ct
187187
handler := r.Adapter.ClaimHandlerFor(r.Client, claim)
188188
if pool, res, err = handler.FetchPool(ctx); err != nil || res != nil {
189189
if apierrors.IsNotFound(err) {
190-
err := errors.New("pool not found")
190+
err := fmt.Errorf("pool not found: %w", err)
191191
log.Error(err, "the referenced pool could not be found")
192192
if !claim.ObjectMeta.DeletionTimestamp.IsZero() {
193193
return r.reconcileDelete(ctx, claim, handler)

0 commit comments

Comments
 (0)