Skip to content

Commit

Permalink
Improve error
Browse files Browse the repository at this point in the history
  • Loading branch information
henrybear327 committed Nov 18, 2024
1 parent 328eb3a commit 6b5b695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/prefixclaim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (r *PrefixClaimReconciler) Reconcile(ctx context.Context, req ctrl.Request)
h := generatePrefixRestorationHash(prefixClaim)
canBeRestored, err := r.NetboxClient.RestoreExistingPrefixByHash(h)
if err != nil {
msg := fmt.Sprintf("failed to restore from restoration hash from CR: %v", prefixClaim.Status.SelectedParendPrefix)
msg := fmt.Sprintf("failed to look up prefix by hash: %v", err.Error())
if err := r.SetConditionAndCreateEvent(ctx, prefixClaim, netboxv1.ConditionParentPrefixSelectedFalse, corev1.EventTypeWarning, msg); err != nil {
return ctrl.Result{}, err
}
Expand Down

0 comments on commit 6b5b695

Please sign in to comment.