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.

Update route.ts

Kiran K26f441392f90
diff --git a/apps/web/app/(ee)/api/cron/discount-codes/create/route.ts b/apps/web/app/(ee)/api/cron/discount-codes/create/route.ts
index f8ab77128e..1fd09543a0 100644
--- a/apps/web/app/(ee)/api/cron/discount-codes/create/route.ts
+++ b/apps/web/app/(ee)/api/cron/discount-codes/create/route.ts
@@ -99,6 +99,7 @@ export const POST = withCron(async ({ rawBody }) => {
// Eg: This application does not have the required permissions for this endpoint on account 'acct_xxx'.
// Having the 'read_write' scope would allow this request to continue.
if (
+ error instanceof Error &&
error.message.includes(
"This application does not have the required permissions",
)