Skip to content

Profile Not Found Error Handling Regression in Zowe Explorer 3.2.2 #3760

@hohy

Description

@hohy

Describe the bug

When a profile not configured in the zowe.config.json is used to access a mainframe resource using the FS provider in the ZE version 3.2.2, a wrong error is thrown.

ZE 3.2.2 throws:

{
  code: "Unknown",
  name: "TypeError (FileSystemError)",
  message: "Cannot read properties of undefined (reading 'name')"
}

ZE 3.2.1 throws:

{
  code: "Unknown",
  name: "Error (FileSystemError)",
  message: "Zowe Explorer Profiles Cache error: Could not find profile named: ibmzosmf."
}

It breaks error handling in our extension and we are unable to show correct error dialog to our users.

To Reproduce

Update ZE to version 3.2.2 in VSCode Marketplace.
Try to access mainframe resouce using ZE FS provider:

try {
  const profile = "bad-profile"; // profile that is not configured in zowe.config.json
  const dsn = 'MY.MF.DATASET';
  await vscode.workspace.fs.stat(
    vscode.Uri.parse(`zowe-ds:/${profile}/${dsn}?fetch=true`),
  );
} (err) {
  vscode.window.showErrorMessage(err.message);
}

Expected behavior

I expect the error message in the version 3.2.2 to be same as in the version 3.2.1.

Screenshots

Desktop (please complete the following information):

  • OS: MacOS
  • Zowe Explorer Version: 3.2.2
  • (Optional) Zowe CLI Version:
  • (Optional) Do you have secure credentials enabled?
  • (Optional) Are you using a custom credential manager?

Additional context

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority-highProduction outage - this quarter or at least next quarterseverity-highBug for which there may be workaround but limits the usage of the Zowe for major use cases

Type

No type
No fields configured for issues without a type.

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions