Display error with TUI and suppress duplicate error#81
Display error with TUI and suppress duplicate error#81carole-lavillonniere merged 1 commit intomainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe changes modify error handling and display behavior in the CLI application. The root command now silences errors and usage output, error messages are displayed through an ErrorEvent system in the UI app, and application errors are wrapped with a silent error wrapper before being returned to callers. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 the current code and only fix it if needed.
Inline comments:
In `@cmd/root.go`:
- Around line 37-38: The PR description incorrectly states that "Flag parsing
errors (caught by Cobra before `RunE`) are unaffected by usage suppression";
update the PR description to accurately reflect that Cobra respects
`root.SilenceUsage` for flag parsing errors as well, so when `root.SilenceUsage
= true` usage output is suppressed for flag parsing errors; mention
`root.SilenceUsage` (and `root.SilenceErrors` if relevant) in the description
and clarify whether the current behavior—no usage output on any error—is
intentional.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 93c37bd9-b51c-4fe4-b61b-820ca0fef72e
📒 Files selected for processing (4)
cmd/root.gointernal/ui/app.gointernal/ui/run.gointernal/ui/run_stop.go
08b3364 to
1367bfa
Compare
Output of
lstk stopfor container not running:Before
After
SilenceErrors = truestops from printingRunEerrors itself.SilenceUsage = truestops from dumping the full usage block on every runtime error (e.g. "container not running"). Flag parsing errors are caught by cobra beforeRunEis reached, so usage suppression does not affect those.