zowe-cli icon indicating copy to clipboard operation
zowe-cli copied to clipboard

`causeErrors` property should not be stringified when return in `--response-format-json`

Open zFernand0 opened this issue 1 year ago • 2 comments

Some commands may be stringifying the causeErrors property when the command has the --rfj option specified.

Here are some examples:

  • "causeErrors": "{\"rc\":4,\"reason\":9,\"category\":6,\"message\":\"Job submission error. Record length 100 too long for JCL submission, maxlen=80\"}" Found in: https://github.com/zowe/zowe-cli/issues/979
  • "causeErrors": "{\"category\":6,\"rc\":8,\"reason\":386400778,\"message\":\"Data set not found.\",\"details\":[\"IKJ56228I DATA SET USERID.NOTHING NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED \"]}" Found by zowe files download ds userid.nothing --rfj

Expected output:

  •   "causeErrors": {
        "errno": -111,
        "code": "ECONNREFUSED",
        "syscall": "connect",
        "address": "255.255.255.255", // wrong ip/host
        "port": 1234 // wrong port
      },
    
    Found by zowe zosmf check status --rfj

zFernand0 avatar Apr 20 '23 17:04 zFernand0

Thank you for raising this enhancement request. The community has 90 days to vote on it. If the enhancement receives at least 5 upvotes, it is added to our development backlog. If it receives fewer votes, the issue is closed.

github-actions[bot] avatar Apr 20 '23 17:04 github-actions[bot]

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.

github-actions[bot] avatar Feb 14 '24 16:02 github-actions[bot]