vscode-azure-iot-toolkit
vscode-azure-iot-toolkit copied to clipboard
Spinner is not dismissed when there's error loading the device list
Steps to reproduce:
- Open command palette to execute a command which needs a device as the input such as "Copy Device Connection String".
- If something wrong happens when the device list is being loaded (such as disconnecting from Internet), the spinner will not be dismissed until you press the ESC button.
The expected behavior is that when there is an error, the spinner should be dismissed automatically and an error message should be shown.
This issue seems not to be specific to vscode.ShowQuickPick
. The direct reason of spinner not being dismissed is that error.message
is undefined
. The root cause is that the error caught by promise.then
and catch
is not a typical Error
object. Issue https://github.com/Microsoft/vscode/issues/39465 has been filed to VS Code team.