Prints out the actual error that happened (#11208)

This commit is contained in:
Amir Omidi
2020-07-06 11:58:14 -07:00
committed by GitHub
parent ac71c6f06d
commit 6eb88924f6

View File

@@ -231,6 +231,7 @@ export abstract class AzureAuth implements vscode.Disposable {
await this.refreshAccessToken(account.key, baseToken.refreshToken, tenant, resource);
} catch (ex) {
console.log(`Could not refresh access token for ${JSON.stringify(tenant)} - silently removing the tenant from the user's account.`);
console.log(`Actual error: ${JSON.stringify(ex?.response?.data ?? ex.message ?? ex), undefined, 2}`);
azureAccount.properties.tenants = azureAccount.properties.tenants.filter(t => t.id !== tenant.id);
continue;
}