Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix(jobs): log change-order assignee lookup failures instead of swallowing them

naveenkash8c3d98846674
diff --git a/packages/jobs/src/inngest/functions/notifications/content.ts b/packages/jobs/src/inngest/functions/notifications/content.ts
index f66ab4ea62..1944326615 100644
--- a/packages/jobs/src/inngest/functions/notifications/content.ts
+++ b/packages/jobs/src/inngest/functions/notifications/content.ts
@@ -1161,6 +1161,11 @@ async function buildEventContent(
.select("fullName")
.eq("id", changeOrderData.assignee)
.maybeSingle();
+ if (assignee.error) {
+ // Best-effort: the assignee row is decorative, so log and send the
+ // notification without it rather than failing the whole job.
+ console.error("Failed to get change order assignee", assignee.error);
+ }
assigneeName = assignee.data?.fullName ?? null;
}