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

Daemon mode shows "Unexpected Command Error" #1081

Closed
t1m0thyj opened this issue Jul 27, 2021 · 3 comments
Closed

Daemon mode shows "Unexpected Command Error" #1081

t1m0thyj opened this issue Jul 27, 2021 · 3 comments
Assignees

Comments

@t1m0thyj
Copy link
Member

Current Behavior:

$ zowe files ls ds SYS1.PARMLIB --host XXX --port 443 --user YYY --password ZZZ --base-path abc
Command Error:
z/OSMF REST API Error:
Rest API failure with HTTP(S) status 404
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The application or context root for this request has not been found: &#047;abc&#047;zosmf&#047;restfiles&#047;ds</p></body></html>
Error Details:
HTTP(S) error status "404" received.
Review request details (resource, base path, credentials, payload) and ensure correctness.

Protocol:  https
Host:      XXX
Port:      1443
Base Path: abc
Resource:  /zosmf/restfiles/ds?dslevel=SYS1.PARMLIB
Request:   GET
Headers:   [{"Accept-Encoding":"gzip"},{"X-IBM-Max-Items":"0"},{"X-CSRF-ZOSMF-HEADER":true}]
Payload:   undefined

$ zowex files ls ds SYS1.PARMLIB --host XXX --port 1443 --user YYY --password ZZZ --base-path abc
Unexpected Command Error:
Please review the message and stack below.
Contact the creator of handler:
"c:\Users\tj891237\Projects\zowe-next\zowe-cli\packages\cli\lib\zosfiles\list\ds\DataSet.handler"
Message:
z/OSMF REST API Error:
Rest API failure with HTTP(S) status 404
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The application or context root for this request has not been found: &#047;abc&#047;zosmf&#047;restfiles&#047;ds</p></body></html>
Stack:
Error: z/OSMF REST API Error:
Rest API failure with HTTP(S) status 404
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The application or context root for this request has not been found: &#047;abc&#047;zosmf&#047;restfiles&#047;ds</p></body></html>
    at ZosmfRestClient.populateError (C:\Users\tj891237\Projects\zowe-next\imperative\lib\rest\src\client\AbstractRestClient.js:521:16)
    at ZosmfRestClient.onEnd (C:\Users\tj891237\Projects\zowe-next\imperative\lib\rest\src\client\AbstractRestClient.js:437:31)
    at IncomingMessage.<anonymous> (C:\Users\tj891237\Projects\zowe-next\imperative\lib\rest\src\client\AbstractRestClient.js:363:18)
    at IncomingMessage.emit (events.js:387:35)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

Expected Behavior: The error output in daemon mode should be identical to the error message produced without daemon mode.

@t1m0thyj t1m0thyj added this to the Zowe vNext Backlog milestone Jul 27, 2021
@gejohnston
Copy link
Member

Another example of different messages occurs when the user types a syntax error:

C:\Users\ej608771>zowe xxxzosmf check status
Command Error:
Command failed due to improper syntax
Unknown group: xxxzosmf
Did you mean:  zosmf check status?
Command entered: "xxxzosmf check status"
Use "zowe --help" to view groups, commands, and options.

C:\Users\ej608771>zowex xxxzosmf check status
Syntax Error:
You specified the following unknown values: "status".
Could not interpret them as a group, command name, or positional option.
Use "zowe xxxzosmf check status --help" to view command description, usage, and options.

@t1m0thyj
Copy link
Member Author

t1m0thyj commented Nov 17, 2021

Another example of different (less informative) messages occurs when Keytar fails to load:

$ zowe profiles create zosmf test --host XXX --port 123 --user XXX --password XXX
Command Error:
Unable to store the secure field "user" associated with the profile "test" of type "zosmf".
Error Details:
Keytar not Installed

$ ./zowex profiles create zosmf test --host XXX --port 123 --user XXX --password XXX
Command Preparation Failed:
Keytar not Installed

@t1m0thyj
Copy link
Member Author

Error messages in comments 1 and 3 appear to have been fixed, but I can still reproduce the inconsistent message in comment 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants