Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cancelling MVS/TSO command causes error #3422

Open
JWaters02 opened this issue Jan 29, 2025 · 1 comment · May be fixed by #3440
Open

Cancelling MVS/TSO command causes error #3422

JWaters02 opened this issue Jan 29, 2025 · 1 comment · May be fixed by #3440
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.

Comments

@JWaters02
Copy link

JWaters02 commented Jan 29, 2025

Describe the bug

When pressing escape in the text input field for entering either an MVS or TSO command, there are errors that show up. This is not expected as we are cancelling the "issue command" command, not submitting the empty or un-finished command.

Cancelling issue MVS command error:

[2025/01/29 11:07:49] [TRACE] ZoweCommandProvider.issueCommand called.
[2025/01/29 11:07:49] [ERROR] Error: Rest API failure with HTTP(S) status 400
{
  errorDetails: s [Error]: Rest API failure with HTTP(S) status 400
      at m.populateError (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:416:284)
      at x (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:403:6976)
      at m.onEnd (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:403:7217)
      at IncomingMessage.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:403:5394)
      at IncomingMessage.emit (node:events:530:35)
      at endReadableNT (node:internal/streams/readable:1698:12)
      at processTicksAndRejections (node:internal/process/task_queues:82:21) {
    mDetails: {
      msg: 'Rest API failure with HTTP(S) status 400',
      causeErrors: `{"reason":"Can not find 'cmd' field in request body OR value of 'cmd' is empty. No command will be issued!","return-code":1,"reason-code":13}`,
      source: 'http',
      errorCode: 400,
      protocol: 'https',
      port: port,
      host: 'host',
      basePath: '',
      httpStatus: 400,
      errno: undefined,
      syscall: undefined,
      payload: { cmd: '' },
      headers: [
        { 'Content-Type': 'application/json' },
        { 'X-CSRF-ZOSMF-HEADER': true }
      ],
      resource: '/zosmf/restconsoles/consoles/defcn',
      request: 'PUT',
      additionalDetails: 'Received HTTP(S) error 400 = Bad Request.\n' +
        '\n' +
        'Protocol:          https\n' +
        'Host:             host\n' +
        'Port:              port\n' +
        'Base Path:         \n' +
        'Resource:          /zosmf/restconsoles/consoles/defcn\n' +
        'Request:           PUT\n' +
        'Headers:           [{"Content-Type":"application/json"},{"X-CSRF-ZOSMF-HEADER":true}]\n' +
        "Payload:           { cmd: '' }\n" +
        'Auth type:         basic\n' +
        'Allow Unauth Cert: true'
    },
    mMessage: 'Rest API failure with HTTP(S) status 400'
  },
  apiType: 'cmd',
  profile: undefined
}

Cancelling issue TSO command error:

[2025/01/29 11:09:35] [TRACE] ZoweCommandProvider.issueCommand called.
[2025/01/29 11:09:35] [ERROR] Error: Expect Error: Imperative API Error No command text was provided.
{
  errorDetails: o [Error]: Expect Error: Imperative API Error No command text was provided.
      at Function.toNotBeEqual (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:316:5334)
      at Function.validateNotEmptyString (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:584:7372)
      at Function.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:583:293)
      at Generator.next (<anonymous>)
      at b (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\vendors.extension.js:582:6812)
      at processTicksAndRejections (node:internal/process/task_queues:95:5) {
    mDetails: { msg: 'Imperative API Error No command text was provided.' },
    mMessage: 'Expect Error: Imperative API Error No command text was provided.'
  },
  apiType: 'cmd',
  profile: undefined
}

To Reproduce

Steps to reproduce the behavior:

  1. Log into zosmf profile
  2. Right click tree and click "issue MVS/TSO command"
  3. Press escape while in the "enter command" text field
  4. See error

Expected behavior

No error, or perhaps a message box saying command cancelled or similar.

Desktop (please complete the following information):

  • OS: Windows
  • Zowe Explorer Version: v3.1.0
  • (Optional) Zowe CLI Version:
  • (Optional) Are you using Secure Credential Store? Yes
Copy link

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.

@JTonda JTonda added priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex. labels Jan 30, 2025
@zowe-robot zowe-robot moved this from New Issues to Medium Priority in Zowe Explorer for VS Code Jan 30, 2025
JWaters02 added a commit to JWaters02/zowe-explorer-vscode that referenced this issue Feb 6, 2025
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
@JWaters02 JWaters02 linked a pull request Feb 6, 2025 that will close this issue
15 tasks
JWaters02 added a commit to JWaters02/zowe-explorer-vscode that referenced this issue Feb 6, 2025
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>

chore: changelog

Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>

Fix failing tests

This is due to adding a new message box to say that operation was cancelled, and tests were still expecting no message

Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.
Projects
Status: Medium Priority
Development

Successfully merging a pull request may close this issue.

2 participants