Remove REST API from Arc extension (#11888)

* wip

* Remove old API

* Fix tests
This commit is contained in:
Charles Gagnon
2020-08-20 15:56:46 -07:00
committed by GitHub
parent 9c81db574e
commit b2a1738836
209 changed files with 550 additions and 15997 deletions

View File

@@ -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;
}
/**