-
Notifications
You must be signed in to change notification settings - Fork 216
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
fix: remove empty error wrapping #1185
fix: remove empty error wrapping #1185
Conversation
That's not how https://github.com/pkg/errors/blob/614d223910a179a466c1767a985424175c39b465/errors.go#L181-L196
|
I'm sorry that my own misunderstanding memed this into existence, but honestly the proposed changes read better in my eyes, even if the two are isomorphic. Nothing magical is happening and the error path is neatly separated from the happy path. |
I agree, but if we observed non-nil, empty errors and thought that this was the cause - it's not. This isn't the fix and the bug is elsewhere. |
Co-authored-by: Evan Baker <[email protected]> Signed-off-by: Ritwik Ranjan <[email protected]>
Description
This pull request includes changes to improve error handling in the
pkg/plugin/hnsstats/vfp_counters_windows.go
file. The most important changes include modifying thegetVfpPortCountersRaw
andlistvPorts
functions to ensure they return appropriate error messages when command execution fails.Error handling improvements:
pkg/plugin/hnsstats/vfp_counters_windows.go
: Modified thegetVfpPortCountersRaw
function to return an empty string and wrapped error message when command execution fails.pkg/plugin/hnsstats/vfp_counters_windows.go
: Modified thelistvPorts
function to return the command output and wrapped error message when command execution fails.Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Please add any relevant screenshots or GIFs to showcase the changes made.
Additional Notes
Add any additional notes or context about the pull request here.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.