Update api to pass more detailed error messaging from azurecore (#22003)

* update api to pass more detailed error messaging from azurecore

* fix formatting

* fix buid error

* fix pr comments

* move to azdata.proposed.d.ts

* pr comments

* Update extensions/azurecore/src/account-provider/auths/azureAuth.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* refactor

* pr comments

* Update src/sql/workbench/services/accountManagement/browser/accountManagementService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* pr comments

* Update src/sql/azdata.proposed.d.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update extensions/azurecore/src/account-provider/auths/azureAuth.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* fix formatting

* fix compile error

* fix compile error

* pr comments

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Christopher Suh
2023-02-23 13:00:18 -08:00
committed by GitHub
parent 85056fb1b7
commit b7e0bbb64a
3 changed files with 42 additions and 18 deletions

View File

@@ -145,14 +145,21 @@ export abstract class AzureAuth implements vscode.Disposable {
Logger.error(ex.originalMessageAndException);
}
} else {
const message = ex.errorMessage || ex.message;
if (message) {
loginComplete?.reject(new AzureAuthError(message, message, undefined));
return {
canceled: false,
errorCode: ex.errorCode,
errorMessage: message
};
}
Logger.error(ex);
}
return {
canceled: false
};
} finally {
loginComplete?.reject(new AzureAuthError(localize('azureAuth.unidentifiedError', "Unidentified error with azure authentication"), 'Unidentified error with azure auth', undefined));
}
}