Closed kevinkatzke closed 5 months ago
@kevinkatzke is attempting to deploy a commit to the Vercel Solutions Team on Vercel.
A member of the Team first needs to authorize it.
Deletion of products and sensible error handling are supported by this PR: https://github.com/vercel/nextjs-subscription-payments/pull/271
This commit adds and handler that throws and error when Stripe sends unsupported events to the applications webhook endpoint
<project-url/api/webhooks>
. The error messages can be obtained from the Vercel logs.Use case: I tried to delete products in Stripe and wondered why the Supabase DB wasn't reflecting the changes. I noticed that
app/webhooks/route.ts
doesn't support the Stripe eventproduct.deleted
when it is sent to the webhook. This commit adds a relevant error message, making it easier for users to debug such cases.