We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think we could provide a bit more context around the returned errors. Right now there are a lot of these kind of error returns:
if err := r.Create(ctx, newRule); err != nil { return ctrl.Result{}, err } // ... if err := r.Update(ctx, newRule); err != nil { return ctrl.Result{}, err }
In this specific example it might not be immediately clear in the logs if an error occurred during the the Create or Update step.
Create
Update
My suggestion would be to wrap errors with minimal context.
The text was updated successfully, but these errors were encountered:
Again, happy to provide a PR? 😌
Sorry, something went wrong.
Yes, wrapping with fmt.Errorf("error: %w", err) sounds really good. Logging might be a similar issue where sometimes it's missing context.
fmt.Errorf("error: %w", err)
Successfully merging a pull request may close this issue.
I think we could provide a bit more context around the returned errors. Right now there are a lot of these kind of error returns:
In this specific example it might not be immediately clear in the logs if an error occurred during the the
Create
orUpdate
step.My suggestion would be to wrap errors with minimal context.
The text was updated successfully, but these errors were encountered: