@salesforce/core 5.3.19 → 5.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/org/org.js +12 -2
- package/messages/org.md +10 -0
- package/package.json +1 -1
package/lib/org/org.js
CHANGED
|
@@ -28,7 +28,7 @@ const connection_1 = require("./connection");
|
|
|
28
28
|
const authInfo_1 = require("./authInfo");
|
|
29
29
|
const scratchOrgCreate_1 = require("./scratchOrgCreate");
|
|
30
30
|
const orgConfigProperties_1 = require("./orgConfigProperties");
|
|
31
|
-
const messages = new messages_1.Messages('@salesforce/core', 'org', new Map([["notADevHub", "The provided dev hub username %s is not a valid dev hub."], ["noUsernameFound", "No username found."], ["noDevHubFound", "Unable to associate this scratch org with a DevHub."], ["deleteOrgHubError", "The Dev Hub org cannot be deleted."], ["insufficientAccessToDelete", "You do not have the appropriate permissions to delete a scratch org. Please contact your Salesforce admin."], ["scratchOrgNotFound", "Attempting to delete an expired or deleted org"], ["sandboxDeleteFailed", "The sandbox org deletion failed with a result of %s."], ["sandboxNotFound", "We can't find a SandboxProcess for the sandbox %s."], ["sandboxInfoCreateFailed", "The sandbox org creation failed with a result of %s."], ["missingAuthUsername", "The sandbox %s does not have an authorized username."], ["orgPollingTimeout", "Sandbox status is %s; timed out waiting for completion."], ["NotFoundOnDevHub", "The scratch org does not belong to the dev hub username %s."], ["AuthInfoOrgIdUndefined", "AuthInfo orgId is undefined."], ["sandboxCreateNotComplete", "The sandbox creation has not completed."], ["SandboxProcessNotFoundBySandboxName", "We can't find a SandboxProcess with the SandboxName %s."], ["MultiSandboxProcessNotFoundBySandboxName", "We found more than one SandboxProcess with the SandboxName %s."], ["sandboxNotResumable", "The sandbox %s cannot resume with status of %s."]]));
|
|
31
|
+
const messages = new messages_1.Messages('@salesforce/core', 'org', new Map([["notADevHub", "The provided dev hub username %s is not a valid dev hub."], ["noUsernameFound", "No username found."], ["noDevHubFound", "Unable to associate this scratch org with a DevHub."], ["deleteOrgHubError", "The Dev Hub org cannot be deleted."], ["insufficientAccessToDelete", "You do not have the appropriate permissions to delete a scratch org. Please contact your Salesforce admin."], ["scratchOrgNotFound", "Attempting to delete an expired or deleted org"], ["sandboxDeleteFailed", "The sandbox org deletion failed with a result of %s."], ["sandboxNotFound", "We can't find a SandboxProcess for the sandbox %s."], ["sandboxInfoCreateFailed", "The sandbox org creation failed with a result of %s."], ["missingAuthUsername", "The sandbox %s does not have an authorized username."], ["orgPollingTimeout", "Sandbox status is %s; timed out waiting for completion."], ["NotFoundOnDevHub", "The scratch org does not belong to the dev hub username %s."], ["AuthInfoOrgIdUndefined", "AuthInfo orgId is undefined."], ["sandboxCreateNotComplete", "The sandbox creation has not completed."], ["SandboxProcessNotFoundBySandboxName", "We can't find a SandboxProcess with the SandboxName %s."], ["MultiSandboxProcessNotFoundBySandboxName", "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."]]]));
|
|
32
32
|
var OrgTypes;
|
|
33
33
|
(function (OrgTypes) {
|
|
34
34
|
OrgTypes["Scratch"] = "scratch";
|
|
@@ -546,7 +546,17 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
546
546
|
method: 'GET',
|
|
547
547
|
};
|
|
548
548
|
const conn = this.getConnection();
|
|
549
|
-
|
|
549
|
+
try {
|
|
550
|
+
await conn.request(requestInfo);
|
|
551
|
+
}
|
|
552
|
+
catch (e) {
|
|
553
|
+
// an html error page like https://computing-connect-6970-dev-ed.scratch.my.salesforce.com/services/data/v50.0
|
|
554
|
+
// where the message is an entire html page
|
|
555
|
+
if (e instanceof Error && (e.name.includes('ERROR_HTTP') || e.message.includes('<html '))) {
|
|
556
|
+
throw messages.createError('UnexpectedResponse', [], [conn.baseUrl()], e);
|
|
557
|
+
}
|
|
558
|
+
throw e;
|
|
559
|
+
}
|
|
550
560
|
}
|
|
551
561
|
/**
|
|
552
562
|
* Reads and returns the content of all user auth files for this org as an array.
|
package/messages/org.md
CHANGED
|
@@ -65,3 +65,13 @@ We found more than one SandboxProcess with the SandboxName %s.
|
|
|
65
65
|
# sandboxNotResumable
|
|
66
66
|
|
|
67
67
|
The sandbox %s cannot resume with status of %s.
|
|
68
|
+
|
|
69
|
+
# UnexpectedResponse
|
|
70
|
+
|
|
71
|
+
Unexpected response from the platform
|
|
72
|
+
|
|
73
|
+
# UnexpectedResponse.actions
|
|
74
|
+
|
|
75
|
+
- Check that the instance URL is correct and the org still exists.
|
|
76
|
+
|
|
77
|
+
- See what's at the URL that's causing the problem: %s.
|