The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add buffer
Steven Tey5a5b17fbaf5b
diff --git a/apps/web/app/api/track/lead/route.ts b/apps/web/app/api/track/lead/route.tsindex 85b56f783a..f372eed794 100644--- a/apps/web/app/api/track/lead/route.ts+++ b/apps/web/app/api/track/lead/route.ts@@ -136,6 +136,10 @@ export const POST = withWorkspace(// Use recordLeadSync which waits for the operation to completeawait recordLeadSync(createLeadEventPayload(customer.id));++ // Add a small delay to ensure the operation is fully processed+ // This helps mitigate any potential race conditions+ await new Promise((resolve) => setTimeout(resolve, 500)); // 500ms buffer}waitUntil(