The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
revert changes for now
Steven Teyc4f38b48ee46
diff --git a/apps/web/lib/api/conversions/track-lead.ts b/apps/web/lib/api/conversions/track-lead.tsindex fe15d151a2..f408c62e7c 100644--- a/apps/web/lib/api/conversions/track-lead.ts+++ b/apps/web/lib/api/conversions/track-lead.ts@@ -53,9 +53,10 @@ export const trackLead = async ({// otherwise, throw an error (this is for mode="deferred" lead tracking)if (!clickId) {if (!customer || !customer.clickId) {- return trackLeadResponseSchema.parse({- click: null,- customer: null,+ throw new DubApiError({+ code: "bad_request",+ message:+ "The `clickId` property was not provided in the request, and no existing customer with the provided `customerExternalId` was found.",});}diff --git a/apps/web/lib/zod/schemas/leads.ts b/apps/web/lib/zod/schemas/leads.tsindex 1e836f3564..0d8d9f9ffd 100644--- a/apps/web/lib/zod/schemas/leads.ts+++ b/apps/web/lib/zod/schemas/leads.ts@@ -73,19 +73,15 @@ export const trackLeadRequestSchema = z.object({});export const trackLeadResponseSchema = z.object({- click: z- .object({- id: z.string(),- })- .nullable(),- customer: z- .object({- name: z.string().nullable(),- email: z.string().nullable(),- avatar: z.string().nullable(),- externalId: z.string().nullable(),- })- .nullable(),+ click: z.object({+ id: z.string(),+ }),+ customer: z.object({+ name: z.string().nullable(),+ email: z.string().nullable(),+ avatar: z.string().nullable(),+ externalId: z.string().nullable(),+ }),});export const leadEventSchemaTB = clickEventSchemaTB