Skip to content

Commit 61bbac4

Browse files
authored
Merge pull request #4685 from harveyxia/awsmachinepool-wrap-error
🐛 Wrap error when AWSMachinePool reconciler fails to get infra provider cluster
2 parents 2cb44e2 + d27bc67 commit 61bbac4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exp/controllers/awsmachinepool_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (r *AWSMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Reque
122122

123123
infraCluster, err := r.getInfraCluster(ctx, log, cluster, awsMachinePool)
124124
if err != nil {
125-
return ctrl.Result{}, errors.New("error getting infra provider cluster or control plane object")
125+
return ctrl.Result{}, fmt.Errorf("getting infra provider cluster or control plane object: %w", err)
126126
}
127127
if infraCluster == nil {
128128
log.Info("AWSCluster or AWSManagedControlPlane is not ready yet")

0 commit comments

Comments
 (0)