fix: wrap formatted errors with %w - #1200
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (7)
📝 WalkthroughWalkthroughLinux networking error paths now use Go’s ChangesLinux error wrapping
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@handle_retry_linux_test.go`:
- Line 162: In the failure return within the retry test, change the
ErrDumpInterrupted formatting in the fmt.Errorf call from %w to %v so the
timeout sentinel is described without being wrapped; preserve the existing
message and guidance text.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6ce1e738-d1d2-4774-9217-cda9c0ee3c68
📒 Files selected for processing (8)
addr_linux.gobridge_linux.goclass_linux.godevlink_linux.gohandle_retry_linux_test.golink_linux.gonl/nl_linux.goroute_linux.go
Replace formatted error wrapping that used
%vwith%wso callers can inspect the underlying errors witherrors.Isanderrors.As.This updates error paths across address, bridge, class, devlink, link, route, and netlink namespace handling, plus the retry test helper.
Example
Previously, callers could receive an error message that included a syscall error, but the original error was flattened into text: