Skip to content

Commit

Permalink
Decorate errors from external interfaces
Browse files Browse the repository at this point in the history
Improves debuggability in terms of detecting where the
error originated from, given the additional context.

The added log line for Create was oterwise caught when
looking at status update for DRPC and lacked context
on where it was from.

Signed-off-by: Shyamsundar Ranganathan <[email protected]>
(cherry picked from commit 206e799)
  • Loading branch information
ShyamsundarR committed Aug 24, 2023
1 parent 347ced0 commit cb39329
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/drplacementcontrol_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ func (r *DRPlacementControlReconciler) createOrUpdatePlacementDecision(ctx conte
plDecision.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*owner}

if err := r.Create(ctx, plDecision); err != nil {
return err
return fmt.Errorf("failed to create PlacementDecision %w", err)
}
}

Expand Down

0 comments on commit cb39329

Please sign in to comment.