meshery: [mesheryctl] improve the error messages shown to users for "mesheryctl perf"
See mesheryctl Command Tracker for current status of commands. For additional context, see https://github.com/meshery/meshery/pull/5661.
Current Behavior
Responses from mesheryctl
commands don’t always have the best user experience in mind.
Desired Behavior
Improve the error messages in mesheryctl commands from the user’s perspective.
- Ensure that there are proper error messages when users:
- Give more arguments to a command than required
- Misspell a command
- Do not give the required input via flags or args
- Use the command without any arguments or flags.
- The error messages being displayed to users are meaningful from user’s perspective. And if applicable, a potential fix for the problem should be shown too. For example
- “failed to unmarshal response body” could be modified to “couldn’t process JSON response from server”
- “manifest not found” could be modified to “manifest not found. Please provide the path to the app manifest.”
Implementation
The commands in scope of this issue are:
-
mesheryctl perf
-
mesheryctl perf apply
-
mesheryctl perf profile
-
mesheryctl perf result
Acceptance Tests
- Contributor adhered to the Meshery CLI Style Guide.
Contributor Resources
- ⌨️ mesheryctl Contributing Guide
- Beginner’s guide to contributing to Meshery and mesheryctl
- mesheryctl Command Tracker
- Meshery CLI Commands and Documentation
- 🙋🏾🙋🏼 Questions: Layer5 Discussion Forum and Layer5 Community Slack 📚 For the Reference head over to this pr.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (8 by maintainers)
Yes @gopivaibhav, please go ahead. Looking forward to your pull request.