Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update create-stripe-promotion-code.ts

Kiran K6aff4857fe18
diff --git a/apps/web/lib/stripe/create-stripe-promotion-code.ts b/apps/web/lib/stripe/create-stripe-promotion-code.ts
index 5bb5303549..8b1c78966b 100644
--- a/apps/web/lib/stripe/create-stripe-promotion-code.ts
+++ b/apps/web/lib/stripe/create-stripe-promotion-code.ts
@@ -64,6 +64,8 @@ export async function createStripePromotionCode({
} catch (error) {
lastError = error instanceof Error ? error : new Error(String(error));
+ console.error(lastError);
+
const isDuplicateError =
error instanceof Error &&
error.message.includes("An active promotion code with `code:") &&