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 route.ts

Steven Tey13be36dd88d0
diff --git a/apps/web/app/api/track/sale/route.ts b/apps/web/app/api/track/sale/route.ts
index 0f28b42911..d465373f75 100644
--- a/apps/web/app/api/track/sale/route.ts
+++ b/apps/web/app/api/track/sale/route.ts
@@ -42,11 +42,10 @@ export const POST = withWorkspaceEdge(
});
if (!ok) {
- console.info(
- "[Stripe Webhook] Skipping already processed invoice.",
- invoiceId,
- );
- return `Invoice with ID ${invoiceId} already processed, skipping...`;
+ throw new DubApiError({
+ code: "conflict",
+ message: `Invoice with ID ${invoiceId} already processed, skipping...`,
+ });
}
}