The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add try catch
Steven Tey6f066eb2a16c
diff --git a/apps/web/lib/auth/options.ts b/apps/web/lib/auth/options.tsindex 2f35d10b85..403d12a36c 100644--- a/apps/web/lib/auth/options.ts+++ b/apps/web/lib/auth/options.ts@@ -456,16 +456,20 @@ export const authOptions: NextAuthOptions = {const clickId = cookies().get("dclid")?.value;if (clickId) {// send lead event to Dub- waitUntil(- dub.track.lead({- clickId,- eventName: "Sign Up",- customerId: user.id,- customerName: user.name,- customerEmail: user.email,- customerAvatar: user.image,- }),- );+ try {+ waitUntil(+ dub.track.lead({+ clickId,+ eventName: "Sign Up",+ customerId: user.id,+ customerName: user.name,+ customerEmail: user.email,+ customerAvatar: user.image,+ }),+ );+ } catch (error) {+ console.error("Error sending lead event to Dub", error);+ }// delete the clickId cookiecookies().delete("dclid");}