#ya-yang_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1316930461276180591
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ya-yang_api, 20 hours ago, 3 messages
Hello! Can you share the ID of the other request that used this same idempotency key?
Or are you referring to the An event already exists with identifier error (which has nothing to do with idempotency)?
Here is the error message: Stripe error creating usage event for cus_RB8aLMIbAsTvf4: Request req_LHK8C0YZ1VaF4K: An event already exists with identifier 3262_monthly_payroll_20241110_20241211.
Stripe error creating usage event for cus_RB8aLMIbAsTvf4: Request req_xv483b0CT6cugq: An event already exists with identifier 3262_monthly_payroll_20241110_20241211.
Stripe error creating usage event for cus_RB8aLMIbAsTvf4: Request req_NHa0xv8T5CaxHX: An event already exists with identifier 3262_monthly_payroll_20241110_20241211.
Yeah, that's not related to the idempotency key. The idempotency key on this request is entirely different. See here for details: https://docs.stripe.com/api/idempotent_requests
For the error you're seeing that's expected behavior and is explained here: https://docs.stripe.com/api/billing/meter-event/create#create_billing_meter_event-identifier
oh the key I passed into this api is "identifier"
Yes.
I want to be able to handle that
Handle what?
this error type so that I don't have to retry again
Oh, you mean you're asking what type of exception will be thrown for this error response in Python?
If so, it should be stripe.error.InvalidRequestError.
Note that's not unique to this specific error, many other types of invalid requests will also fall under that type.
Oh, yeah, but what all will throw this error response?
Many, many things. Basically any invalid request where you supply invalid information to the API.
Retrying the same invalid request is unlikely to work a second time, but it depends on the specifics of the situation.
Why are you sending the same identifier in the same 24 hour period?
I was just testing, but it most likely won't happen