From d4ee6ca8ba5454ed243ed75a526868d0b60aafb6 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 7 Jul 2022 09:29:37 -0700 Subject: [PATCH] Autohouse error fix. --- server/data/autohouse.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/data/autohouse.js b/server/data/autohouse.js index 08fcc9815..265187796 100644 --- a/server/data/autohouse.js +++ b/server/data/autohouse.js @@ -113,6 +113,7 @@ exports.default = async (req, res) => { allErrors.push({ bodyshopid: bodyshop.id, imexshopid: bodyshop.imexshopid, + autuhouseid: bodyshop.autuhouseid, fatal: true, errors: [error.toString()], }); @@ -120,7 +121,12 @@ exports.default = async (req, res) => { allErrors.push({ bodyshopid: bodyshop.id, imexshopid: bodyshop.imexshopid, - errors: erroredJobs, + autohouseid: bodyshop.autohouseid, + errors: erroredJobs.map((ej) => ({ + ro_number: ej.job?.ro_number, + jobid: ej.job?.id, + error: ej.error, + })), }); } } @@ -199,6 +205,7 @@ const CreateRepairOrderTag = (job, errorCallback) => { if (!job.job_totals) { errorCallback({ jobid: job.id, + job: job, ro_number: job.ro_number, error: { toString: () => "No job totals for RO." }, });