fix(bookin): corrected the error received from the book in fail
This commit is contained in:
@@ -96,7 +96,7 @@ export const bookInLabel = async (data: any) => {
|
||||
"ocp",
|
||||
`${
|
||||
data.printer ? data.printer[0].name : "Manual book in"
|
||||
}, "Error: ${error}`
|
||||
}, "Error: ${error?.response.data}`
|
||||
);
|
||||
// console.log(error.response.data);
|
||||
return {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { bookInLabel } from "./bookIn.js";
|
||||
import { delieryInhouse } from "../specialProcesses/inhouse/inhouseDelivery.js";
|
||||
import { dualPrintingProcess } from "../specialProcesses/dualPrinting/dualPrinting.js";
|
||||
import { getMac } from "../../utils/getMachineId.js";
|
||||
import { success } from "zod/v4";
|
||||
|
||||
interface Printer {
|
||||
name: string;
|
||||
@@ -283,6 +284,20 @@ export const labelingProcess = async ({
|
||||
// will add later!!! :P
|
||||
}
|
||||
|
||||
if (!book.success) {
|
||||
// createLog(
|
||||
// "error",
|
||||
// "labeling",
|
||||
// "ocp",
|
||||
// `Error Booking in label: ${book.errors[0].message}`
|
||||
// );
|
||||
return {
|
||||
success: false,
|
||||
message: `Error Booking in label: ${book.errors[0].message}`,
|
||||
data: book,
|
||||
};
|
||||
}
|
||||
|
||||
// inhouse - if the inhouse funtion is turned on we will deliver to inhouse as long as we did not hit an error state
|
||||
const inhouseDelivery = settingData.filter(
|
||||
(s) => s.name === "inhouseDelivery"
|
||||
|
||||
Reference in New Issue
Block a user