mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Improve the tenant logging (#20688)
* added tenant response logging * add headers to logging * throw error after tenant response failure
This commit is contained in:
@@ -368,6 +368,11 @@ export abstract class AzureAuth implements vscode.Disposable {
|
||||
try {
|
||||
Logger.verbose('Fetching tenants', tenantUri);
|
||||
const tenantResponse = await this.makeGetRequest(tenantUri, token.token);
|
||||
if (tenantResponse.status !== 200) {
|
||||
Logger.error(`Error with tenant response, status: ${tenantResponse.status} | status text: ${tenantResponse.statusText}`);
|
||||
Logger.error(`Headers: ${JSON.stringify(tenantResponse.headers)}`);
|
||||
throw new Error('Error with tenant response');
|
||||
}
|
||||
const tenants: Tenant[] = tenantResponse.data.value.map((tenantInfo: TenantResponse) => {
|
||||
Logger.verbose(`Tenant: ${tenantInfo.displayName}`);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user