You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue arises after encountering a 429 Too Many Requests error, which likely returns an incorrect Retry-After header value like 30,120 (representing two retry times or a malformed retry interval). When the retry handler attempts to process this value, it throws an error because it cannot properly parse the value into an integer due to the comma.
<kiota_http.middleware.retry_handler.RetryHandler object at 0x1104f2780>
retry_after = '30,120'
def _parse_retry_after(self, retry_after):
"""
Helper to parse Retry-After and get value in seconds.
"""
try:
> delay = int(retry_after)
E ValueError: invalid literal for int() with base 10: '30,120'
Client is able to properly parse value & retry request or if still gets 429, throw an appropriate HTTP exception.
How to reproduce
Steps to Reproduce:
Trigger a 429 Too Many Requests error by sending multiple simultaneous requests to sites graph endpoint: client.sites.get(request_configuration=request)
Observe that the Retry-After header contains the value "30,120".
The retry handler fails with the error ValueError: invalid literal for int() with base 10: '30,120'.
SDK Version
1.26.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```
self =
retry_after = '30,120'
def _parse_retry_after(self, retry_after):
"""
Helper to parse Retry-After and get value in seconds.
"""
try:
delay = int(retry_after)
E ValueError: invalid literal for int() with base 10: '30,120'
Describe the bug
The issue arises after encountering a 429 Too Many Requests error, which likely returns an incorrect Retry-After header value like 30,120 (representing two retry times or a malformed retry interval). When the retry handler attempts to process this value, it throws an error because it cannot properly parse the value into an integer due to the comma.
Expected behavior
How to reproduce
Steps to Reproduce:
Trigger a 429 Too Many Requests error by sending multiple simultaneous requests to sites graph endpoint:
client.sites.get(request_configuration=request)
Observe that the Retry-After header contains the value "30,120".
The retry handler fails with the error ValueError: invalid literal for int() with base 10: '30,120'.
SDK Version
1.26.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
``` self = retry_after = '30,120'E ValueError: invalid literal for int() with base 10: '30,120'
../.venv/lib/python3.xx/site-packages/kiota_http/middleware/retry_handler.py:205: ValueError
The text was updated successfully, but these errors were encountered: