From c9d212b8b8d93a75a6ffa836697a58a7f13397f6 Mon Sep 17 00:00:00 2001 From: Ben Senescu <44480372+bensenescu@users.noreply.github.com> Date: Wed, 8 Apr 2026 00:21:28 -0400 Subject: [PATCH] fix: explicitly pick billingCustomer fields for workflow serialization (#97) The full middleware context object passed as billingCustomer contained non-serializable properties (Drizzle project result, TanStack internals) that caused a DataCloneError in Miniflare's workflow binding during Docker self-hosting. --- src/serverFunctions/audit.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/serverFunctions/audit.ts b/src/serverFunctions/audit.ts index da133c2..47498cd 100644 --- a/src/serverFunctions/audit.ts +++ b/src/serverFunctions/audit.ts @@ -18,7 +18,11 @@ export const startAudit = createServerFn({ method: "POST" }) .handler(async ({ data, context }) => { const result = await AuditService.startAudit({ actorUserId: context.userId, - billingCustomer: context, + billingCustomer: { + organizationId: context.organizationId, + userEmail: context.userEmail, + userId: context.userId, + }, projectId: context.projectId, startUrl: data.startUrl, maxPages: data.maxPages,