From 699e4a2dddedd6d8fca3e7c4d208a2ae69be3e92 Mon Sep 17 00:00:00 2001 From: siddharthd Date: Wed, 12 Aug 2026 17:12:14 +1000 Subject: [PATCH] =?UTF-8?q?orders:=20cast=20cadence=20order=5Fcount=20to?= =?UTF-8?q?=20int=20=E2=80=94=20BigInt=20broke=20every=20recurring=20merch?= =?UTF-8?q?ant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit order_merchant_cadence.order_count is a count(*), so BIGINT, and JSON.stringify throws on it: 'Do not know how to serialize a BigInt', a 500 carrying no SQL. It fires only where a cadence EXISTS, so the failure hid behind the merchant_entity_id fault and reappeared the moment that was fixed — St. Ali (40 orders, 14-day cadence) still 500'd while Amazon opened fine. --- src/lib/order-feed.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/order-feed.ts b/src/lib/order-feed.ts index 6b4cc1f..a42ad44 100644 --- a/src/lib/order-feed.ts +++ b/src/lib/order-feed.ts @@ -399,7 +399,13 @@ export async function getOrderDetail(entityKey: string): Promise