The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
handle unhandled events case in webhook
Steven Tey5c15ee4c734d
diff --git a/pages/api/stripe/webhook.ts b/pages/api/stripe/webhook.tsindex cf1c6ee596..7751336bf0 100644--- a/pages/api/stripe/webhook.ts+++ b/pages/api/stripe/webhook.ts@@ -101,6 +101,8 @@ export default async function webhookHandler(.status(400).send('Webhook error: "Webhook handler failed. View logs."');}+ } else {+ return res.status(400).send(`🤷♀️ Unhandled event type: ${event.type}`);}res.json({ received: true });