Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove empty error wrapping (#1185)
# 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 the `getVfpPortCountersRaw` and `listvPorts` functions to ensure they return appropriate error messages when command execution fails. Error handling improvements: * [`pkg/plugin/hnsstats/vfp_counters_windows.go`](diffhunk://#diff-0999dc1285d058391926e8093f7a02cea33a0e2d3cd1ba29bfd1b153900d23c2L156-R170): Modified the `getVfpPortCountersRaw` function to return an empty string and wrapped error message when command execution fails. * [`pkg/plugin/hnsstats/vfp_counters_windows.go`](diffhunk://#diff-0999dc1285d058391926e8093f7a02cea33a0e2d3cd1ba29bfd1b153900d23c2L156-R170): Modified the `listvPorts` function to return the command output and wrapped error message when command execution fails. ## Checklist - [X] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [X] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [X] I have correctly attributed the author(s) of the code. - [ ] I have tested the changes locally. - [X] I have followed the project's style guidelines. - [X] I have updated the documentation, if necessary. - [X] I have added tests, if applicable. ## 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](../CONTRIBUTING.md) file for more information on how to contribute to this project. --------- Signed-off-by: Ritwik Ranjan <[email protected]> Co-authored-by: Evan Baker <[email protected]>
- Loading branch information