Skip to content

Commit

Permalink
Revert "Revert "MWPW-168029 | Correct error page for forms error""
Browse files Browse the repository at this point in the history
  • Loading branch information
aishwaryamathuria authored Feb 19, 2025
1 parent 54b1493 commit d5453f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions creativecloud/features/cc-forms/forms/trials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
Expand Down Expand Up @@ -367,22 +367,22 @@ 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;
}

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;
}
Expand Down

0 comments on commit d5453f8

Please sign in to comment.