Skip to content

Commit d27bc67

Browse files
committed
Wrap error when failing to get infra provider cluster
1 parent 5780796 commit d27bc67

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)