PR feedback updates
This commit is contained in:
parent
176669e3eb
commit
93ec6050d8
4 changed files with 10 additions and 5 deletions
|
|
@ -9,7 +9,8 @@ const bailoutCode = Object.freeze({
|
|||
TPANotEnabled: 7,
|
||||
RequestCallback: 8,
|
||||
HeavyTruckVehicle: 9,
|
||||
PartDBError: 10
|
||||
NoPartsAvailable: 10,
|
||||
PartsServiceError: 11
|
||||
});
|
||||
|
||||
export default bailoutCode;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,12 @@ const bailoutMessage = Object.freeze({
|
|||
code: bailoutCode.HeavyTruckVehicle,
|
||||
message: `User selected a heavy truck vehicle. Car ID: ${carId} `
|
||||
}),
|
||||
PartDBError: (error) => ({
|
||||
code: bailoutCode.PartDBError,
|
||||
NoPartsAvailable: () => ({
|
||||
code: bailoutCode.NoPartsAvailable,
|
||||
message: 'No parts were returned'
|
||||
}),
|
||||
PartsServiceError: (error) => ({
|
||||
code: bailoutCode.PartsServiceError,
|
||||
message: `An error occurred in getPartsOrQuestions. Error: ${getItemData(error)}`
|
||||
})
|
||||
});
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ export default {
|
|||
|
||||
const partsOrQuestionsResponse = await this.getPartsOrQuestions();
|
||||
if (partsOrQuestionsResponse.error) {
|
||||
this.mainStore.setBailout(bailoutMessage.PartDBError(partsOrQuestionsResponse.error.data));
|
||||
this.mainStore.setBailout(bailoutMessage.PartsServiceError(partsOrQuestionsResponse.error.data));
|
||||
window.console.error('Error on retrieving PartsOrQuestions');
|
||||
this.$refs.siteFooter.removeLoader();
|
||||
this.hasBailedOut = true;
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ export default {
|
|||
|
||||
const partsOrQuestionsResponse = await this.getPartsOrQuestions();
|
||||
if (partsOrQuestionsResponse.error) {
|
||||
this.mainStore.setBailout(bailoutMessage.PartDBError(partsOrQuestionsResponse.error.data));
|
||||
this.mainStore.setBailout(bailoutMessage.PartsServiceError(partsOrQuestionsResponse.error.data));
|
||||
window.console.error('Error on retrieving PartsOrQuestions');
|
||||
this.$refs.siteFooter.removeLoader();
|
||||
this.hasBailedOut = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue