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,
|
TPANotEnabled: 7,
|
||||||
RequestCallback: 8,
|
RequestCallback: 8,
|
||||||
HeavyTruckVehicle: 9,
|
HeavyTruckVehicle: 9,
|
||||||
PartDBError: 10
|
NoPartsAvailable: 10,
|
||||||
|
PartsServiceError: 11
|
||||||
});
|
});
|
||||||
|
|
||||||
export default bailoutCode;
|
export default bailoutCode;
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,12 @@ const bailoutMessage = Object.freeze({
|
||||||
code: bailoutCode.HeavyTruckVehicle,
|
code: bailoutCode.HeavyTruckVehicle,
|
||||||
message: `User selected a heavy truck vehicle. Car ID: ${carId} `
|
message: `User selected a heavy truck vehicle. Car ID: ${carId} `
|
||||||
}),
|
}),
|
||||||
PartDBError: (error) => ({
|
NoPartsAvailable: () => ({
|
||||||
code: bailoutCode.PartDBError,
|
code: bailoutCode.NoPartsAvailable,
|
||||||
|
message: 'No parts were returned'
|
||||||
|
}),
|
||||||
|
PartsServiceError: (error) => ({
|
||||||
|
code: bailoutCode.PartsServiceError,
|
||||||
message: `An error occurred in getPartsOrQuestions. Error: ${getItemData(error)}`
|
message: `An error occurred in getPartsOrQuestions. Error: ${getItemData(error)}`
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,7 @@ export default {
|
||||||
|
|
||||||
const partsOrQuestionsResponse = await this.getPartsOrQuestions();
|
const partsOrQuestionsResponse = await this.getPartsOrQuestions();
|
||||||
if (partsOrQuestionsResponse.error) {
|
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');
|
window.console.error('Error on retrieving PartsOrQuestions');
|
||||||
this.$refs.siteFooter.removeLoader();
|
this.$refs.siteFooter.removeLoader();
|
||||||
this.hasBailedOut = true;
|
this.hasBailedOut = true;
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ export default {
|
||||||
|
|
||||||
const partsOrQuestionsResponse = await this.getPartsOrQuestions();
|
const partsOrQuestionsResponse = await this.getPartsOrQuestions();
|
||||||
if (partsOrQuestionsResponse.error) {
|
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');
|
window.console.error('Error on retrieving PartsOrQuestions');
|
||||||
this.$refs.siteFooter.removeLoader();
|
this.$refs.siteFooter.removeLoader();
|
||||||
this.hasBailedOut = true;
|
this.hasBailedOut = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue