From d5453f8786bf573e83cee27a765e99cb0c28760b Mon Sep 17 00:00:00 2001 From: Aishwarya Mathuria Date: Wed, 19 Feb 2025 21:45:29 +0530 Subject: [PATCH] Revert "Revert "MWPW-168029 | Correct error page for forms error"" --- creativecloud/features/cc-forms/forms/trials.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/creativecloud/features/cc-forms/forms/trials.js b/creativecloud/features/cc-forms/forms/trials.js index 9819021d..06f74924 100644 --- a/creativecloud/features/cc-forms/forms/trials.js +++ b/creativecloud/features/cc-forms/forms/trials.js @@ -26,7 +26,7 @@ const STATUS_REDIRECT_MAP = { 'error-redirect-generic': 'genericerrorpage', 'error-redirect-restriction': 'restrictionerrorpage', 'error-redirect-invalid-format': 'invalidformdataerrorpage', - 'error-redirect-jms': 'bamaunknownerrorpage', + 'error-redirect-jms': 'jmsunknownerrorpage', 'error-redirect-bama': 'bamaunknownerrorpage', 'error-redirect-service-unavailable': 'serviceunavailableerrorpage', }; @@ -367,14 +367,14 @@ class Trials { const errorMap = { NOT_ELIGIBLE_FOR_TRIAL: 'restrictionerrorpage', INVALID_PAYLOAD: 'invalidformdataerrorpage', - UNEXPECTED_JMS_ERROR: 'bamaunknownerrorpage', + UNEXPECTED_JMS_ERROR: 'jmsunknownerrorpage', UNEXPECTED_BAMA_ERROR: 'bamaunknownerrorpage', }; let destination = this.thankyouPage; if ((this.formContainer.getAttribute(DATA_FORM_TYPE) === 'form.connect.action' || this.formContainer.getAttribute(DATA_FORM_TYPE) === 'form.connect.enterprise.action') && response.reason && response.reason !== 'SUCCESS') { - destination = this.getFormConfig(errorMap[response.reason]); + destination = this.getFormConfig(`data-${errorMap[response.reason]}`); } window.location.href = destination; } @@ -382,7 +382,7 @@ class Trials { postSubmitFailure(response) { let destination = this.getFormConfig(`data-${CONF_KEY_ERROR_GENERIC}`); if (response.status === 502 || response.status === 503) { - destination = this.getFormConfig(CONF_KEY_ERROR_UNAVAILABLE); + destination = this.getFormConfig(`data-${CONF_KEY_ERROR_UNAVAILABLE}`); } window.location.href = destination; }