Bailing out when store not found

This commit is contained in:
Michaela Brydon 2024-06-19 12:27:53 -04:00
parent cce07e48d5
commit ee147e7e9e
3 changed files with 19 additions and 0 deletions

View file

@ -312,6 +312,11 @@ export default {
this.$route this.$route
); );
} catch (error) { } catch (error) {
useMainStore().setBailout(bailoutMessage.saveSessionError(error.data));
this.navigate(
this.navigationScenarios.SAVE_SESSION_FAILED,
{ query: { issPage: this.issPageValues.PAYMENT_METHOD } }
);
console.error(`error: response from submit work order:${error.message}`); console.error(`error: response from submit work order:${error.message}`);
} }
} else { } else {

View file

@ -136,6 +136,7 @@ import {
} from '@/helpers/damage-review-content-generator.js'; } from '@/helpers/damage-review-content-generator.js';
import damageLocationsSelected from '@/constants/damage-locations-selected.js'; import damageLocationsSelected from '@/constants/damage-locations-selected.js';
import { submitWorkOrder } from '@/helpers/order-helper.js'; import { submitWorkOrder } from '@/helpers/order-helper.js';
import bailoutMessage from '@/constants/bailoutMessage';
const VERIFYING_COVERAGE = 'Verifying coverage'; const VERIFYING_COVERAGE = 'Verifying coverage';
@ -358,6 +359,11 @@ export default {
}); });
this.navigate(this.navigationScenarios.CLICKED_FORWARD); this.navigate(this.navigationScenarios.CLICKED_FORWARD);
} catch (error) { } catch (error) {
useMainStore().setBailout(bailoutMessage.saveSessionError(error.data));
this.navigate(
this.navigationScenarios.SAVE_SESSION_FAILED,
{ query: { issPage: this.issPageValues.TPA_SUBMIT } }
);
console.error(`error: response from submit work order:${error.message}`); console.error(`error: response from submit work order:${error.message}`);
} }
}, },

View file

@ -637,6 +637,10 @@ const routingTable = () => [
{ {
scenario: navigationScenarios.CLICKED_PAY_NOW, scenario: navigationScenarios.CLICKED_PAY_NOW,
destinationIssPageValue: issPageValues.PAYMENT_PAGE destinationIssPageValue: issPageValues.PAYMENT_PAGE
},
{
scenario: navigationScenarios.SAVE_SESSION_FAILED,
destinationIssPageValue: issPageValues.BAILOUT_PAGE
} }
] ]
}, },
@ -709,6 +713,10 @@ const routingTable = () => [
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.TPA_CONFIRMATION destinationIssPageValue: issPageValues.TPA_CONFIRMATION
},
{
scenario: navigationScenarios.SAVE_SESSION_FAILED,
destinationIssPageValue: issPageValues.BAILOUT_PAGE
} }
] ]
}, },