Function to validate that credential manager will load successfully after ProfilesInfo
constructor called
#2111
Labels
enhancement
New feature or request
priority-medium
Not functioning - next quarter if capacity permits
Is your feature or enhancement request related to a problem or limitation? Please describe
In Zowe Explorer, we utilize the
ProfilesInfo
API for loading our default and custom credential managers. Our issue is that when calling the constructor we expect the credential manager to be loaded during initialization, but instead the credential manager is loaded untilreadProfilesFromDisk
is called.Describe your enhancement idea
For this issue, I would like for the
ProfilesInfo
API to provide a way to check early whether or not the credential manager will fail when loading, so that way we won't rely on thereadProfilesFromDisk
function that can be called in multiple locations and can be harder to trace.Describe alternatives you've considered
My current alternative is to call
await profileInfo.readProfilesFromDisk()
after the constructor in atry/catch
that will catch error and handle accordingly, although not great since it uses the entire part of thereadProfilesFromDisk
code if successful, it currently is the only way to catch this error early, which is not conventional.Provide any additional context
Imperative code screenshots:
The text was updated successfully, but these errors were encountered: