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(erp): stop an audit-log flag timeout from 500ing every page (#1326)

Sid6c8846cbe886
diff --git a/apps/erp/app/routes/x+/_layout.tsx b/apps/erp/app/routes/x+/_layout.tsx
index 03a128462b..ad1768e74d 100644
--- a/apps/erp/app/routes/x+/_layout.tsx
+++ b/apps/erp/app/routes/x+/_layout.tsx
@@ -139,7 +139,9 @@ export async function loader({ request }: LoaderFunctionArgs) {
getUserClaims(userId, companyId),
getUserGroups(client, userId),
getUserDefaults(client, userId, companyId),
- isAuditLogEnabled(client, companyId),
+ // Throws, unlike the {data, error} services around it — unguarded, a
+ // transient timeout on this flag 500s every page under /x.
+ isAuditLogEnabled(client, companyId).catch(() => false),
getModulePreferences(client, userId, companyId),
getPrinterRoutes(client, companyId),
getImplementationHub(client, companyId),