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.

  1. Ensure that there are proper error messages when users:
    1. Give more arguments to a command than required
    2. Misspell a command
    3. Do not give the required input via flags or args
    4. Use the command without any arguments or flags.
  2. 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
    1. “failed to unmarshal response body” could be modified to “couldn’t process JSON response from server”
    2. “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

  1. Contributor adhered to the Meshery CLI Style Guide.

Contributor Resources

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Yes @gopivaibhav, please go ahead. Looking forward to your pull request.