Socket
Socket
Sign inDemoInstall

@salesforcedevs/dw-components

Package Overview
Dependencies
9
Maintainers
12
Versions
239
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.218 to 1.3.219-canary.0

5

package.json
{
"name": "@salesforcedevs/dw-components",
"version": "1.3.218",
"version": "1.3.219-canary.0",
"description": "Lightning web components for https://developer.salesforce.com",

@@ -26,4 +26,3 @@ "license": "MIT",

"setimmediate": "^1.0.5"
},
"gitHead": "4da04a9390fd75ee83751992b259acb60a47fd98"
}
}

40

src/modules/dw/deSignupForm/deSignupForm.ts

@@ -19,2 +19,3 @@ import { LightningElement, api, track } from "lwc";

const SIGN_UP_LABEL = "Sign me Up";
const SIGN_UP_FORM_TIMEOUT_MS = 18.5 * 1000; // Something in trialforce/DRM's backend (still under investigation) is causing requests to timeout around 20 seconds; we use 18.5 here in case it's sometimes a little faster than that

@@ -117,3 +118,17 @@ export default class DeSignupForm extends LightningElement {

// Due to Heroku's non-configurable 30 second request timeout, the POST request that
// submits the form can "fail" even though org creation is actually succeeding (but
// taking longer than 30 seconds). The back-end only gives us a "generic" error in that
// case, so we use a "good enough" heuristic here and direct the user to an "account-verification"
// page that doesn't ultimately say things worked, but tells them to watch their email.
// This should be a temporary bandaid, not a full solution.
let didSubmitTimeout = false;
let formSubmissionTimeoutId: number | undefined = window.setTimeout(
() => {
didSubmitTimeout = true;
},
SIGN_UP_FORM_TIMEOUT_MS
);
this.disableSubmit = true;
submitForm(formData)

@@ -141,10 +156,23 @@ .then(() => {

.catch((error) => {
if (error.message === ErrorCode.DUPLICATE) {
this.knownDuplicateUsers.push(formData.user.username);
return;
if (error.message === ErrorCode.GENERIC && didSubmitTimeout) {
// If the timeout time has passed at the point of error, and the error code is simply "GENERIC",
// we do not know whether the org will ultimately be created (and we have no current way of confirming),
// so we navigate the user to an interim page that tells them to watch their email.
window.location.href = "/signup/account-verification";
} else {
this.disableSubmit = false;
if (error.message === ErrorCode.DUPLICATE) {
this.knownDuplicateUsers.push(formData.user.username);
} else {
console.log(
"Oops, something went wrong",
error.message
);
}
}
console.log("Oops, something went wrong", error.message);
})
.finally(() => (this.disableSubmit = false));
.finally(() => {
clearTimeout(formSubmissionTimeoutId);
formSubmissionTimeoutId = undefined;
});
}

@@ -151,0 +179,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc