Improved error logging.

This commit is contained in:
Patrick Fic
2025-09-18 11:32:48 -07:00
parent c8771275ce
commit 517c30787d

View File

@@ -215,7 +215,7 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, ioHelpers, sele
const DMSBatchTxn = await InsertDmsBatchWip({ socket, redisHelpers, JobData }); const DMSBatchTxn = await InsertDmsBatchWip({ socket, redisHelpers, JobData });
await setSessionTransactionData(socket.id, getTransactionType(jobid), FortellisCacheEnums.DMSBatchTxn, DMSBatchTxn, defaultFortellisTTL); await setSessionTransactionData(socket.id, getTransactionType(jobid), FortellisCacheEnums.DMSBatchTxn, DMSBatchTxn, defaultFortellisTTL);
if (DMSBatchTxn.rtnCode === "0") {
CreateFortellisLogEvent( CreateFortellisLogEvent(
socket, socket,
"DEBUG", "DEBUG",
@@ -256,6 +256,15 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, ioHelpers, sele
// CdkBase.createLogEvent(socket, "ERROR", `Error(s) encountered in posting transaction.${ e } `) // CdkBase.createLogEvent(socket, "ERROR", `Error(s) encountered in posting transaction.${ e } `)
// ); // );
} }
} else {
//Posting transaction failed.
CreateFortellisLogEvent(
socket,
"ERROR",
`DMS Batch Return code was not successful: ${DMSBatchTxn.rtnCode} - ${DMSBatchTxn.sendline}`
);
}
} catch (error) { } catch (error) {
// CdkBase.createLogEvent(socket, "ERROR", `Error encountered in CdkSelectedCustomer.${ error } `); // CdkBase.createLogEvent(socket, "ERROR", `Error encountered in CdkSelectedCustomer.${ error } `);
CreateFortellisLogEvent(socket, "ERROR", `Error in FortellisSelectedCustomer - ${error} `, { CreateFortellisLogEvent(socket, "ERROR", `Error in FortellisSelectedCustomer - ${error} `, {