Skip to content

Commit

Permalink
Merge pull request #183 from mshitrit/bug-fix-error-msg-on-config-update
Browse files Browse the repository at this point in the history
fixing error code missing because of wrong error conversion
  • Loading branch information
openshift-merge-bot[bot] authored Jan 31, 2024
2 parents 7e88291 + 87834d0 commit 138f6dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/selfnoderemediationconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func (r *SelfNodeRemediationConfigReconciler) Reconcile(ctx context.Context, req
}

if err := r.syncConfigDaemonSet(ctx, config); err != nil {
if errors.IsConflict(err) {
return ctrl.Result{RequeueAfter: time.Second}, nil
}
logger.Error(err, "error syncing DS")
return ctrl.Result{}, err
}
Expand Down Expand Up @@ -180,7 +183,7 @@ func (r *SelfNodeRemediationConfigReconciler) syncK8sResource(ctx context.Contex
}

if err := apply.ApplyObject(ctx, r.Client, in); err != nil {
return fmt.Errorf("failed to apply object %v with err: %v", in, err)
return pkgerrors.Wrapf(err, "failed to apply object %v", in)
}
return nil
}
Expand Down

0 comments on commit 138f6dc

Please sign in to comment.