release/2026-02-27 - Fix Time ticket issue, add additional logging around reynolds
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const { RRClient } = require("./lib/index.cjs");
|
||||
const { getRRConfigFromBodyshop } = require("./rr-config");
|
||||
const CreateRRLogEvent = require("./rr-logger-event");
|
||||
const { withRRRequestXml } = require("./rr-log-xml");
|
||||
const InstanceManager = require("../utils/instanceMgr").default;
|
||||
|
||||
/**
|
||||
@@ -217,14 +218,24 @@ const createRRCustomer = async ({ bodyshop, job, overrides = {}, socket }) => {
|
||||
try {
|
||||
response = await client.insertCustomer(safePayload, opts);
|
||||
// Very noisy; only show when log level is cranked to SILLY
|
||||
CreateRRLogEvent(socket, "SILLY", "{CU} insertCustomer: raw response", { response });
|
||||
CreateRRLogEvent(
|
||||
socket,
|
||||
"SILLY",
|
||||
"{CU} insertCustomer: raw response",
|
||||
withRRRequestXml(response, { response })
|
||||
);
|
||||
} catch (e) {
|
||||
CreateRRLogEvent(socket, "ERROR", "RR insertCustomer transport error", {
|
||||
message: e?.message,
|
||||
code: e?.code,
|
||||
status: e?.meta?.status || e?.status,
|
||||
payload: safePayload
|
||||
});
|
||||
CreateRRLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
"RR insertCustomer transport error",
|
||||
withRRRequestXml(e, {
|
||||
message: e?.message,
|
||||
code: e?.code,
|
||||
status: e?.meta?.status || e?.status,
|
||||
payload: safePayload
|
||||
})
|
||||
);
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -233,12 +244,17 @@ const createRRCustomer = async ({ bodyshop, job, overrides = {}, socket }) => {
|
||||
|
||||
let customerNo = data?.dmsRecKey;
|
||||
if (!customerNo) {
|
||||
CreateRRLogEvent(socket, "ERROR", "RR insertCustomer returned no dmsRecKey/custNo", {
|
||||
status: trx?.status,
|
||||
statusCode: trx?.statusCode,
|
||||
message: trx?.message,
|
||||
data
|
||||
});
|
||||
CreateRRLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
"RR insertCustomer returned no dmsRecKey/custNo",
|
||||
withRRRequestXml(response, {
|
||||
status: trx?.status,
|
||||
statusCode: trx?.statusCode,
|
||||
message: trx?.message,
|
||||
data
|
||||
})
|
||||
);
|
||||
|
||||
throw new Error(
|
||||
`RR insertCustomer returned no dmsRecKey (status=${trx?.status ?? "?"} code=${trx?.statusCode ?? "?"}${
|
||||
|
||||
Reference in New Issue
Block a user