Shell.executeSsh error handling doesn't handle multiple connection failures #2327
Labels
bug
Something isn't working
priority-medium
Not functioning - next quarter if capacity permits
severity-low
Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases
Describe the bug
If a hostname is resolveable by multiple IP addresses, Shell will attempt to go through each one. If it fails to resolve any of the addresses, and there is more then one address that was tried, it will return with a list of errors (via AggregateError), not a single error.
Our error handling assumes that a single error was thrown. However, in this case,
err.message
is undefined becauseerr
is an AggregateError which contains a list of errors, not a single error. We then throw an unexpected error, and sinceerr.message
is undefined on AggregateError, no useful output is given to the user.Error handling should be updated to check if there is an
errors
list onerr
and, if so, concatenate and display the error messages together.The text was updated successfully, but these errors were encountered: