Skip to content

Commit

Permalink
Fix error on delete (#382)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ejizba authored Apr 4, 2018
1 parent ca1fafa commit c50c2e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/explorer/SiteTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export abstract class SiteTreeItem implements IAzureParentTreeItem {
}

public async refreshLabel(): Promise<void> {
this._state = await this.client.getState();
try {
this._state = await this.client.getState();
} catch {
this._state = 'Unknown';
}
}

public hasMoreChildren(): boolean {
Expand Down

0 comments on commit c50c2e5

Please sign in to comment.