#nachofranco14 - idempotency key
1 messages ยท Page 1 of 1 (latest)
Hi there!
What do you mean by
but just catching and retrying the APIError wouldn't solve it as it can be another kind of APIError.
that if I could identify this kind of issue, I would retry until the error doesn't happen anymore
and that would mean that the first request was handled and the second received the response of the first one
because they shar ethe same idemp key
I'm sorry I don't follow. When you do get that error, it means another similar request is already being handled by Stripe. So you should catch that error, and you could check if the first request succeeded or not.
exactly
but how can I catch the error
if it's not specific
APIError is not the same as DuplicatedRequestError
APIError is too general and I'm pretty sure it matches with other errors
@candid stratus or @tropic maple
๐ give me a moment to catch up and I'll respond as soon as I can, thanks ๐
In this case, you'd likely want to look at the error code instead, code: "idempotency_key_in_use"