Skip to content

Commit 269758d

Browse files
committed
Wrap error messages
1 parent 53fe252 commit 269758d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

controllers/awsmachine_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (r *AWSMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request)
188188

189189
infraCluster, err := r.getInfraCluster(ctx, log, cluster, awsMachine)
190190
if err != nil {
191-
return ctrl.Result{}, errors.New("error getting infra provider cluster or control plane object")
191+
return ctrl.Result{}, errors.Errorf("error getting infra provider cluster or control plane object: %v", err)
192192
}
193193
if infraCluster == nil {
194194
log.Info("AWSCluster or AWSManagedControlPlane is not ready yet")
@@ -797,7 +797,7 @@ func (r *AWSMachineReconciler) deleteIgnitionBootstrapDataFromS3(machineScope *s
797797
return nil
798798
}
799799

800-
// If bootstrap data has not been populated yet, we cannot determine it's format, so there is probably nothing to do.
800+
// If bootstrap data has not been populated yet, we cannot determine its format, so there is probably nothing to do.
801801
if machineScope.Machine.Spec.Bootstrap.DataSecretName == nil {
802802
return nil
803803
}

exp/controllers/awsmachinepool_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP
328328

329329
err = machinePoolScope.UpdateInstanceStatuses(ctx, asg.Instances)
330330
if err != nil {
331-
machinePoolScope.Info("Failed updating instances", "instances", asg.Instances)
331+
machinePoolScope.Error(err, "failed updating instances", "instances", asg.Instances)
332332
}
333333

334334
return ctrl.Result{}, nil

0 commit comments

Comments
 (0)