-
Notifications
You must be signed in to change notification settings - Fork 171
Improve error messages with actionable recovery hints #3165
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
Improve error messages with actionable recovery hints #3165
Conversation
Improve user experience by adding actionable hints to error messages in rm, stop, restart, and group commands. Each error message now includes a "Hint:" suffix that guides users on how to resolve the issue. Error scenarios updated: - rm/stop: flags conflict with workload names - rm/stop: missing workload name argument - rm/stop/restart: group does not exist - restart: flags conflict with workload name - restart: missing workload specification - group: cannot delete default group - group rm: group does not exist - group run: registry group not found - group run: runtime group already exists - group run: MCP server already exists Fixes stacklok#3048 Signed-off-by: majiayu000 <1835304752@qq.com>
eleftherias
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @majiayu000. I've left a comment below about a hint that recommends a command that does not exist.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3165 +/- ##
=======================================
Coverage 63.63% 63.63%
=======================================
Files 357 357
Lines 35156 35156
=======================================
Hits 22373 22373
Misses 10979 10979
Partials 1804 1804 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for the PR @majiayu000! I made a small change and merged this. |
Summary
This PR fixes #3048
Changes
cmd/thv/app/group.gocmd/thv/app/restart.gocmd/thv/app/rm.gocmd/thv/app/stop.go