#birdy247-rate-limit

1 messages · Page 1 of 1 (latest)

idle dragon
fringe tiger
#

100 requests per second

#

We are running this on a queue, so it wont be more than that!

#

Can we catch this excpetion?

#

try {
//Retrieve the balance transaction so we can portion out the correct fees
$balanceTransaction = \Stripe\BalanceTransaction::retrieve(
$charge->balance_transaction,
[
'stripe_account' => $stripe->stripe_user_id,
]
);
} catch (EXCEPTION???) {

            }
#

I notice there is a RateLimit exception

#

Would this be the one?

idle dragon
#

Yes, you should be able to catch the exceptions raised when our libraries encounter a 429 response from the API. It looks like you're referring to our PHP library, so yes that exception looks correct. I would just recommend that you double check the exact version of our PHP library that you're using to see whether it's before a fairly large refactor that was performed which updated exception names:
https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v7