diff --git a/src/layouts/duplicate-check/duplicate-check.vue b/src/layouts/duplicate-check/duplicate-check.vue index 325145e2..cdfd087d 100644 --- a/src/layouts/duplicate-check/duplicate-check.vue +++ b/src/layouts/duplicate-check/duplicate-check.vue @@ -138,23 +138,32 @@ export default { async forwardButtonAction() { showIssLoadingModal(true); - // If user clicked foward without selecting an option or user click on "start a new claim" button. - if (this.selectedAnswer == null || this.selectedAnswer === 'NewClaim') { - // Call SaveSession to create referral. - await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true }); - } - else + try { - const selectedReferral = - this.mainStore.applicationUser.duplicateOrders.find((o) => o.correlationId === this.selectedAnswer); - - if (selectedReferral) { - await this.mainStore.loadSessionFromDuplicate(selectedReferral); + // If user clicked foward without selecting an option or user click on "start a new claim" button. + if (this.selectedAnswer == null || this.selectedAnswer === 'NewClaim') { + // Call SaveSession to create referral. + await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true }); } + else + { + const selectedReferral = + this.mainStore.applicationUser.duplicateOrders.find((o) => o.correlationId === this.selectedAnswer); + + if (selectedReferral) { + await this.mainStore.loadSessionFromDuplicate(selectedReferral); + } + } + + // Call getCoveragePolicyInfo to get the policy info. + await this.mainStore.getCoveragePolicyInfo(); + } + catch (error) { + // No error handling here needed. + // SaveSession will bailout. + // LoadSession will bailout. + // GetCoveragePolicyInfo handles exception / error internally. } - - // Call getCoveragePolicyInfo to get the policy info. - await this.mainStore.getCoveragePolicyInfo(); this.pushEventToGA("policy_search", "policy_found", this.mainStore.isPolicyLookupSuccessful ? "Yes" : "No", true);