From 6deabcd603055786311994cb25c8c9282ff9971d Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 9 Nov 2023 09:36:00 -0600 Subject: [PATCH 1/4] fix: http 420 errors --- src/org/org.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/org/org.ts b/src/org/org.ts index c061b89b3f..e498e08332 100644 --- a/src/org/org.ts +++ b/src/org/org.ts @@ -699,7 +699,24 @@ 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(' Date: Thu, 9 Nov 2023 09:43:44 -0600 Subject: [PATCH 2/4] refactor: use messages for text --- messages/org.md | 10 ++++++++++ src/org/org.ts | 10 +--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/messages/org.md b/messages/org.md index d4dddcc81e..cbb345a13c 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 e498e08332..d6cdec5fa0 100644 --- a/src/org/org.ts +++ b/src/org/org.ts @@ -705,15 +705,7 @@ export class Org extends AsyncOptionalCreatable { // 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(' Date: Thu, 9 Nov 2023 09:51:32 -0600 Subject: [PATCH 3/4] style: missing hyphen --- messages/org.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messages/org.md b/messages/org.md index cbb345a13c..97524ef844 100644 --- a/messages/org.md +++ b/messages/org.md @@ -74,4 +74,4 @@ Unexpected response from the platform - Check that the instance URL is correct and the org still exists. -See what's at the URL that's causing the problem: %s. +- See what's at the URL that's causing the problem: %s. From 6f375b932cb0c43436b1d58ca76543e66aae1a4a Mon Sep 17 00:00:00 2001 From: svc-cli-bot Date: Fri, 10 Nov 2023 15:11:32 +0000 Subject: [PATCH 4/4] chore(release): 5.3.20 [skip ci] --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15581f7083..3443b42b90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [5.3.20](https://github.com/forcedotcom/sfdx-core/compare/5.3.19...5.3.20) (2023-11-10) + + +### Bug Fixes + +* http 420 errors ([6deabcd](https://github.com/forcedotcom/sfdx-core/commit/6deabcd603055786311994cb25c8c9282ff9971d)) + + + ## [5.3.19](https://github.com/forcedotcom/sfdx-core/compare/5.3.18...5.3.19) (2023-11-08) diff --git a/package.json b/package.json index f0599099d6..9c799d2bb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@salesforce/core", - "version": "5.3.19", + "version": "5.3.20", "description": "Core libraries to interact with SFDX projects, orgs, and APIs.", "main": "lib/exported", "types": "lib/exported.d.ts",