Skip to content

Commit ba5e216

Browse files
Merge pull request #244 from pcoop/branch1
Better error message when CMCI calls fail
2 parents 115ad76 + 804c535 commit ba5e216

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

__tests__/api/BundlePush/BundlePusher.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,7 @@ describe("BundlePusher01", () => {
12031203

12041204
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
12051205

1206+
expect(consoleText).toContain("An attempt to query the remote CICSplex using the cics plug-in has failed.");
12061207
expect(zosMFSpy).toHaveBeenCalledTimes(1);
12071208
expect(sshSpy).toHaveBeenCalledTimes(1);
12081209
expect(listSpy).toHaveBeenCalledTimes(1);

src/api/BundlePush/BundlePusher.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,12 @@ export class BundlePusher {
657657
logger.debug(diagnosticsError.message);
658658
}
659659
}
660+
661+
// Something went wrong, suggest a command that can be run to figure out more.
662+
if (msgBuffer === "") {
663+
this.issueMessage("An attempt to query the remote CICSplex using the cics plug-in has failed.");
664+
}
665+
660666
return msgBuffer;
661667
}
662668

@@ -681,7 +687,7 @@ export class BundlePusher {
681687
if (msgBuffer === "") {
682688
msgBuffer += "For further information on the state of your NODEJSAPP resources, consider running the following command:\n\n" +
683689
"zowe cics get resource CICSNodejsapp --region-name " + this.params.arguments.scope +
684-
" --criteria \"BUNDLE=" + this.params.arguments.name + "\" --cics-plex " + this.params.arguments.cicsplex + "\n";
690+
" --criteria \"BUNDLE=" + this.params.arguments.name + "\" --cics-plex " + this.params.arguments.cicsplex + "\n\n";
685691
}
686692

687693
return msgBuffer;

0 commit comments

Comments
 (0)