From 3730672c9745debc30c523096d9869c6aa282b98 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 26 Jan 2022 12:56:37 +0000 Subject: [PATCH] Merge pull request #6502 from overleaf/jpa-skip-likely-failing-login-request [web] skip login re-try request when no captcha response was generated GitOrigin-RevId: 9edc6e8394914a710020983fe9cbcf09d543a82f --- services/web/frontend/js/features/form-helpers/hydrate-form.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/web/frontend/js/features/form-helpers/hydrate-form.js b/services/web/frontend/js/features/form-helpers/hydrate-form.js index bc5859926f..5cea762a81 100644 --- a/services/web/frontend/js/features/form-helpers/hydrate-form.js +++ b/services/web/frontend/js/features/form-helpers/hydrate-form.js @@ -33,6 +33,9 @@ function formSubmitHelper(formEl) { ) { // Trigger captcha unconditionally. const captchaResponse = await validateCaptchaV2() + if (!captchaResponse) { + throw e + } data = await sendFormRequest(formEl, captchaResponse) } else { throw e