mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Remove REST API from Arc extension (#11888)
* wip * Remove old API * Fix tests
This commit is contained in:
@@ -191,19 +191,7 @@ export async function promptAndConfirmPassword(validate: (input: string) => stri
|
||||
* @param error The error object
|
||||
*/
|
||||
export function getErrorMessage(error: any): string {
|
||||
if (error.body?.reason) {
|
||||
// For HTTP Errors with a body pull out the reason message since that's usually the most helpful
|
||||
return error.body.reason;
|
||||
} else if (error.message) {
|
||||
if (error.response?.statusMessage) {
|
||||
// Some Http errors just have a status message as additional detail, but it's not enough on its
|
||||
// own to be useful so append to the message as well
|
||||
return `${error.message} (${error.response.statusMessage})`;
|
||||
}
|
||||
return error.message;
|
||||
} else {
|
||||
return error;
|
||||
}
|
||||
return error.message ?? error;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user