Revert "Prints out the actual error that happened" (#11212)

* Revert "Prints out the actual error that happened (#11208)"

This reverts commit 6eb88924f6.

* Fix the JSON.stringify
This commit is contained in:
Amir Omidi
2020-07-06 12:23:46 -07:00
committed by GitHub
parent 0043a7f93b
commit b0cab3125e

View File

@@ -231,7 +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}`);
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;
}