Skip to content

Commit

Permalink
🌱 Better error message if CSR could not find machine. (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
guettli authored May 7, 2024
1 parent c11321d commit 79d8199
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/csr_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ func (r *GuestCSRReconciler) getMachineAddresses(
}

if err := r.mCluster.Get(ctx, bmMachineName, &bmMachine); err != nil {
return nil, false, fmt.Errorf("failed to get hcloud and bare metal machine")
return nil, false, fmt.Errorf("failed to get hcloud (%s) or bare metal machine (%s): %w",
hcloudMachineName.Name,
bmMachineName.Name,
err)
}

return bmMachine.Status.Addresses, false, nil
Expand Down

0 comments on commit 79d8199

Please sign in to comment.