PR feedback updates

This commit is contained in:
Katie Kroell 2024-04-30 17:01:02 -04:00
parent 176669e3eb
commit 93ec6050d8
4 changed files with 10 additions and 5 deletions

View file

@ -9,7 +9,8 @@ const bailoutCode = Object.freeze({
TPANotEnabled: 7,
RequestCallback: 8,
HeavyTruckVehicle: 9,
PartDBError: 10
NoPartsAvailable: 10,
PartsServiceError: 11
});
export default bailoutCode;

View file

@ -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)}`
})
});

View file

@ -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;

View file

@ -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;