Closed codespore closed 10 years ago
There's discussion on exception handling on #23. I'll likely remove the rescue altogether.
Quite often that Stripe sends over a post call to my application where, for some reason, records are not found and responds with a 500 error. Only after a 2nd retry from Stripe that it goes through.
It's possible you're seeing a race condition where the database record has not been committed by the time the webhook arrives. I'd be interested to hear more details on this problem.
Hi Guys,
I think it's good to add in the README for sending proper error response back to Stripe Webhook calls by raising Stripe::StripeError, since your Webhook controller implementation already has a rescue that returns a :unauthorized status. Example:-
Quite often that Stripe sends over a post call to my application where, for some reason, records are not found and responds with a 500 error. Only after a 2nd retry from Stripe that it goes through.
It's also stated in Stripe that they will retry if the response they get is other than 200 OK - https://stripe.com/docs/webhooks
Let me know what you guys think.