#Huzaifa

1 messages · Page 1 of 1 (latest)

charred kindleBOT
orchid fox
#

Hello

#

You basically want to just set up retry handling for whenever you encounter this error

split musk
#

can you guide me how can i set this

orchid fox
#

At a high-level sure, but I can't write code for you here.

split musk
#

if i can set it from dashboard

that will be okay too

orchid fox
#

You want to check the response to your request and if it is a 429 with an error_code of lock_timeout then you write code to retry the same request x amount of seconds later

split musk
#

you mean webhook response ???

orchid fox
#

No this error occurs from your code making a request to the Stripe API

#

Do you have a request ID for this 429?

split musk
#

i am making api calls in webhook api

but i always get something there

#

can i just simply use below code to solve this problem

const stripe = Stripe('sk_test_...', {
maxNetworkRetries: 2,
});

?????

orchid fox
#

Yes overall that should also solve most if not all of the issues here

split musk
#

thats nice

so what should be the nice value for it

2 or i can make it 5 or more

orchid fox
#

That mostly just depends on your integration.

#

Overall usually 2 is actually sufficient but there is little harm in boosting it slightly higher