CASH-2563: Reapply bailout

This commit is contained in:
credelinghuys 2026-05-19 13:35:09 -04:00
parent 44811f883a
commit 5fdaa18fc5

View file

@ -1949,21 +1949,21 @@ export const actions = {
pageNameToLog: pageNameToLog,
})
.catch((error) => {
// if (error.status == 500) {
// return { PartsNotFound: true };
// }
if (error.status == 500) {
return { PartsNotFound: true };
}
});
// Triggers bailout
// if (response.PartsNotFound) {
// return response;
// }
if (response.PartsNotFound) {
return response;
}
// Check if we only have MISC parts to trigger bailout
// const miscPartsResponse = checkIfMiscParts(response.data.partsOrQuestions);
// if (miscPartsResponse.PartsNotFound) {
// return miscPartsResponse;
// }
const miscPartsResponse = checkIfMiscParts(response.data.partsOrQuestions);
if (miscPartsResponse.PartsNotFound) {
return miscPartsResponse;
}
// Flatten location and name properties
response.data.partsOrQuestions = convertGlassPieceNamingFromApi(