From c50c2e568f7b9c84854d9774c5ad53e15b87045a Mon Sep 17 00:00:00 2001 From: Eric Jizba Date: Wed, 4 Apr 2018 00:24:30 +0000 Subject: [PATCH] Fix error on delete (#382) When I added support for runWithTemporaryDescription, it had the side-effect of re-getting the state after the site was already deleted. We could fail to get the state in other cases as well and I think its best to just show the state as 'Unknown' instead of displaying an error message --- src/explorer/SiteTreeItem.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/explorer/SiteTreeItem.ts b/src/explorer/SiteTreeItem.ts index ef9b9352..f7b59bc7 100644 --- a/src/explorer/SiteTreeItem.ts +++ b/src/explorer/SiteTreeItem.ts @@ -40,7 +40,11 @@ export abstract class SiteTreeItem implements IAzureParentTreeItem { } public async refreshLabel(): Promise { - this._state = await this.client.getState(); + try { + this._state = await this.client.getState(); + } catch { + this._state = 'Unknown'; + } } public hasMoreChildren(): boolean {