Error Report from Stripe.ts and Relevant Questions
Posting enough to show error for privacy reasons:
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client.at stripeWebhook (/path/app/src/server/webhooks/stripe.ts:253:26)[ Server!] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)[ Server!] at <anonymous> (/path/app/.wasp/out/sdk/wasp/server/utils.ts:26:5)
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client.at stripeWebhook (/path/app/src/server/webhooks/stripe.ts:253:26)[ Server!] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)[ Server!] at <anonymous> (/path/app/.wasp/out/sdk/wasp/server/utils.ts:26:5)
When I log the error right before (it is inside a catch block), it is the same as 'Cannot set headers after they are sent to the client.'
Couple other notes, I did some changes to webhook but I am not sending any extra responses, just capturing extra events to do some updates and record customer payments:
else if (event.type === 'charge.succeeded')
else if (event.type === 'charge.succeeded')
The work goes through successfully (payment is recorded in the db) and nothing is functionally affected by this error but figure this should still be considered.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
W
Wasp
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.