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.

fix error handling

Steven Teyc54d8bf48729
diff --git a/apps/web/app/(ee)/api/paypal/callback/route.ts b/apps/web/app/(ee)/api/paypal/callback/route.ts
index 30257f0907..4e93047c75 100644
--- a/apps/web/app/(ee)/api/paypal/callback/route.ts
+++ b/apps/web/app/(ee)/api/paypal/callback/route.ts
@@ -98,7 +98,7 @@ export const GET = async (req: Request) => {
e instanceof Prisma.PrismaClientKnownRequestError &&
e.code === "P2002"
) {
- throw new Error("paypal_account_already_in_use");
+ error = "paypal_account_already_in_use";
}
error = e.message;