-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Improve patch helper error handling #9946
🌱 Improve patch helper error handling #9946
Conversation
24e3a7e
to
ca41ad8
Compare
ca41ad8
to
2f29684
Compare
Signed-off-by: Stefan Büringer buringerst@vmware.com
2f29684
to
1c760a5
Compare
@@ -741,7 +741,7 @@ func pauseClusterClass(ctx context.Context, proxy Proxy, n *node, pause bool, mu | |||
|
|||
patchHelper, err := patch.NewHelper(clusterClass, cFrom) | |||
if err != nil { | |||
return errors.Wrapf(err, "error creating patcher for ClusterClass %s/%s", n.identity.Namespace, n.identity.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems useful information to keep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, I see this is covered in the inner calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I kept additional wrapping only if it provided additional information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
LGTM label has been added. Git tree hash: 68bd831ee657173937ab24f74ca349a64b75d4f9
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Stefan Büringer buringerst@vmware.com
What this PR does / why we need it:
With this PR the patch helper returns errors with the entire available error context. Before this PR we only added error context in some cases and very inconsistently
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #