diff --git a/messages/org.md b/messages/org.md index d4dddcc81e..97524ef844 100644 --- a/messages/org.md +++ b/messages/org.md @@ -65,3 +65,13 @@ We found more than one SandboxProcess with the SandboxName %s. # sandboxNotResumable The sandbox %s cannot resume with status of %s. + +# UnexpectedResponse + +Unexpected response from the platform + +# UnexpectedResponse.actions + +- Check that the instance URL is correct and the org still exists. + +- See what's at the URL that's causing the problem: %s. diff --git a/src/org/org.ts b/src/org/org.ts index c061b89b3f..d6cdec5fa0 100644 --- a/src/org/org.ts +++ b/src/org/org.ts @@ -699,7 +699,16 @@ export class Org extends AsyncOptionalCreatable { method: 'GET', }; const conn = this.getConnection(); - await conn.request(requestInfo); + try { + await conn.request(requestInfo); + } catch (e) { + // an html error page like https://computing-connect-6970-dev-ed.scratch.my.salesforce.com/services/data/v50.0 + // where the message is an entire html page + if (e instanceof Error && (e.name.includes('ERROR_HTTP') || e.message.includes('