mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Do not show warning messages for stale accounts (#21621)
This commit is contained in:
@@ -50,12 +50,14 @@ export class AzureResourceSubscriptionService implements IAzureResourceSubscript
|
|||||||
void vscode.window.showWarningMessage(errorMsg);
|
void vscode.window.showWarningMessage(errorMsg);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (!account.isStale) {
|
||||||
const errorMsg = localize('azure.resource.tenantSubscriptionsError', "Failed to get subscriptions for account {0} (tenant '{1}'). {2}", account.displayInfo.displayName, tenantId, AzureResourceErrorMessageUtil.getErrorMessage(error));
|
const errorMsg = localize('azure.resource.tenantSubscriptionsError', "Failed to get subscriptions for account {0} (tenant '{1}'). {2}", account.displayInfo.displayName, tenantId, AzureResourceErrorMessageUtil.getErrorMessage(error));
|
||||||
Logger.error(`Failed to get subscriptions for account ${account.displayInfo.displayName} (tenant '${tenantId}'). ${AzureResourceErrorMessageUtil.getErrorMessage(error)}`);
|
Logger.error(`Failed to get subscriptions for account ${account.displayInfo.displayName} (tenant '${tenantId}'). ${AzureResourceErrorMessageUtil.getErrorMessage(error)}`);
|
||||||
errors.push(error);
|
errors.push(error);
|
||||||
void vscode.window.showWarningMessage(errorMsg);
|
void vscode.window.showWarningMessage(errorMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!gotSubscriptions) {
|
if (!gotSubscriptions) {
|
||||||
throw new AzureSubscriptionError(account.key.accountId, errors);
|
throw new AzureSubscriptionError(account.key.accountId, errors);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user