Improve error messages with actionable recovery hints#3165
Merged
eleftherias merged 3 commits intostacklok:mainfrom Jan 13, 2026
Merged
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
requested changes
Jan 2, 2026
Member
eleftherias
left a comment
There was a problem hiding this comment.
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:
|
eleftherias
approved these changes
Jan 13, 2026
dmjb
approved these changes
Jan 13, 2026
lujunsan
approved these changes
Jan 13, 2026
Member
|
Thanks for the PR @majiayu000! I made a small change and merged this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes #3048
Changes
cmd/thv/app/group.gocmd/thv/app/restart.gocmd/thv/app/rm.gocmd/thv/app/stop.go