The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fixed email update error
Steven Teybadb50033670
diff --git a/apps/web/app/api/user/route.ts b/apps/web/app/api/user/route.tsindex 0508850826..a967b2d8c5 100644--- a/apps/web/app/api/user/route.ts+++ b/apps/web/app/api/user/route.ts@@ -54,9 +54,17 @@ export const PUT = withSession(async ({ req, session }) => {} catch (error) {if (error.code === "P2002") {// return res.status(422).end("Email is already in use.");- return new Response("Email is already in use.", { status: 422 });+ return NextResponse.json(+ {+ error: {+ code: "conflict",+ message: "Email is already in use.",+ },+ },+ { status: 422 },+ );}- return new Response(error.message, { status: 500 });+ return NextResponse.json({ error }, { status: 500 });}});