#nukesforbreakfast_unexpected
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/1239488791454945343
đ 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.
- nukesforbreakfast_api, 1 hour ago, 24 messages
Hey
Could you please share some code snipets and what issue you are facing exactly?
+---------------- 15 ----------------
| Traceback (most recent call last):
| File "/home/rccausey/workspace/munipal/billing-and-payment-services/billing-api/generate_invoices.py", line 78, in create_invoice
| customer = await stripe_client.customers.create_async(params=customer_data)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/rccausey/.cache/pypoetry/virtualenvs/billing-api--M5yUIBR-py3.11/lib/python3.11/site-packages/stripe/_customer_service.py", line 909, in create_async
| await self._request_async(
| File "/home/rccausey/.cache/pypoetry/virtualenvs/billing-api--M5yUIBR-py3.11/lib/python3.11/site-packages/stripe/_stripe_service.py", line 52, in _request_async
| return await self._requestor.request_async(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/rccausey/.cache/pypoetry/virtualenvs/billing-api--M5yUIBR-py3.11/lib/python3.11/site-packages/stripe/_api_requestor.py", line 227, in request_async
| resp = requestor._interpret_response(rbody, rcode, rheaders)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/rccausey/.cache/pypoetry/virtualenvs/billing-api--M5yUIBR-py3.11/lib/python3.11/site-packages/stripe/_api_requestor.py", line 732, in _interpret_response
| self.handle_error_response(rbody, rcode, resp.data, rheaders)
| File "/home/rccausey/.cache/pypoetry/virtualenvs/billing-api--M5yUIBR-py3.11/lib/python3.11/site-packages/stripe/_api_requestor.py", line 321, in handle_error_response
| raise err
| stripe._error.RateLimitError: Testmode request rate limit exceeded, the rate limits in testmode are lower than livemode. You can learn more about rate limits here https://stripe.com/docs/rate-limits.
max_network_retries is to enable the SDK to make network retries if there is an issue
it retries only when Stripe API responds with 429
is a rate limit error not a 429?
Have you had the chance to read to description above the code snippets of Stripe.max_network_retries = 2 in order to understand the usage.
oh, so it only acts on lock timeout errors, not all 429 errors.
It's not a limit for retries... it's a way to configure the SDK to make retries if there is a lock timeout and not implementing a mechanism by your self to retry requests.