From 9c5fbbedde7cd30e723dc56c555eae6291007830 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Mon, 2 Feb 2026 09:29:27 -0800 Subject: [PATCH] fail closed --- apps/sim/lib/billing/core/subscription.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/sim/lib/billing/core/subscription.ts b/apps/sim/lib/billing/core/subscription.ts index 61f1f8437..a42636762 100644 --- a/apps/sim/lib/billing/core/subscription.ts +++ b/apps/sim/lib/billing/core/subscription.ts @@ -28,6 +28,8 @@ export { getHighestPrioritySubscription } /** * Check if a referenceId (user ID or org ID) has an active subscription * Used for duplicate subscription prevention + * + * Fails closed: returns true on error to prevent duplicate creation */ export async function hasActiveSubscription(referenceId: string): Promise { try { @@ -40,7 +42,8 @@ export async function hasActiveSubscription(referenceId: string): Promise