fix(labeling): if label fails we want to stop the process and post the why

This commit is contained in:
2025-04-08 06:48:35 -05:00
parent b4a4dfcb75
commit 92d251c122

View File

@@ -214,9 +214,15 @@ export const labelingProcess = async ({
// create the label // create the label
const label = await createLabel(filteredLot[0], userPrinted); const label = await createLabel(filteredLot[0], userPrinted);
// if (!label.success) { if (!label.success) {
// return { sucess: false, message: label.message, data: label.data }; createLog(
// } "error",
"labeling",
"ocp",
`There was an error creating the label: ${label.message}`
);
return { sucess: false, message: label.message, data: label.data };
}
// send over to be booked in if we can do it. // send over to be booked in if we can do it.
const bookin = settingData.filter((s) => s.name === "bookin"); const bookin = settingData.filter((s) => s.name === "bookin");