mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-06-22 06:40:52 +02:00
Adds extra logging for unhandled webhook events
This commit is contained in:
parent
8b0eae5cda
commit
4575008eb4
@ -43,6 +43,7 @@ export const lemonSqueezyWebhook: PaymentsWebhook = async (request, response, co
|
||||
return response.status(200).json({ received: true });
|
||||
} catch (err) {
|
||||
if (err instanceof UnhandledWebhookEventError) {
|
||||
console.error(err.message);
|
||||
return response.status(422).json({ error: err.message });
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,7 @@ export const stripeWebhook: PaymentsWebhook = async (request, response, context)
|
||||
return response.json({ received: true }); // Stripe expects a 200 response to acknowledge receipt of the webhook
|
||||
} catch (err) {
|
||||
if (err instanceof UnhandledWebhookEventError) {
|
||||
console.error(err.message);
|
||||
return response.status(422).json({ error: err.message });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user