Skip to content
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

V3 preview: Inconsistent error reporting #2223

Open
MichalVasak opened this issue Aug 8, 2024 · 4 comments
Open

V3 preview: Inconsistent error reporting #2223

MichalVasak opened this issue Aug 8, 2024 · 4 comments
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases v4 Prospective changes for v4

Comments

@MichalVasak
Copy link

Describe the bug

The error output for 2 similar user errors looks very different:

MISSPELLED command parameter (new format in v3):
Unable to perform this operation due to the following problem.
Unknown argument: systemm
Command failed due to improper syntax
Command entered: "endevor list elements * --systemm ssssssssssssssssssssssssssssssss"
Available commands are "defaults, features, type-sequence, dialog, symbols, instances, code-page-config, environments, stages, systems, subsystems, types, processor-groups, processor-symbols, packages, elements, tasks".
Use "zowe endevor list --help" to view groups, commands, and options.

Response From Service
Error: Unknown argument: systemm

Diagnostic Information
Unknown argument: system

Command parameter value too long:
Syntax Error:
Invalid value length for option:
--system

You specified a string of length 32:
ssssssssssssssssssssssssssssssss

The length must be between 1 and 8 (inclusive)

Example:

  • List elements in Endevor from the specified inventory location with the endevor profile set up:

    $ zowe endevor list elements -i ENDEVOR --env ENVNAME --sn 1 --sys SYSNAME --sub SUBNAME --typ TYPENAME

Use "zowe endevor list elements --help" to view command description, usage, and options.

Expected and actual results
Of course this has no impact on functionality, but at least at first glance it looks like parameter validation was overlooked when making the v3 changes to command output, so I'm reporting it just in case this is an omission.

If this is expected and intended, feel free to close the issue.

Describe your environment
CLI Version: 8.0.0-next.202407311544
Zowe Release Version: v3.0.0-prerelease
Endevor plugin custom build (testing to see if v3 broke anything)
npm v9.5.1
Windows
terminal: powershell
deamon mode disabled

Additional context

@MichalVasak MichalVasak added bug Something isn't working new The issue wasn't triaged yet labels Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

@adam-wolfe
Copy link
Contributor

Screenshot for discussion purposes:
image

@JTonda JTonda added priority-high Production outage - this quarter or at least next quarter severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases and removed new The issue wasn't triaged yet labels Aug 12, 2024
@JTonda JTonda self-assigned this Aug 12, 2024
@traeok
Copy link
Member

traeok commented Aug 12, 2024

Overriding error message during failure:
https://yargs.js.org/docs/#api-reference-failfn-boolean

We can use this function to print our own error instead of using the one thrown by yargs.

@JTonda JTonda assigned ATorrise and unassigned JTonda Aug 12, 2024
@adam-wolfe adam-wolfe added v4 Prospective changes for v4 priority-low Legit issue but cosmetic or nice-to-have and removed priority-high Production outage - this quarter or at least next quarter labels Aug 19, 2024
@adam-wolfe
Copy link
Contributor

adam-wolfe commented Aug 19, 2024

In the interest of avoiding introducing last-minute breaking changes to the V3 pre-release, we have decided to keep error messages as-is until V4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases v4 Prospective changes for v4
Projects
Status: Low Priority
Development

No branches or pull requests

5 participants