ValueError When Handling Retry-After Headers After 429 Too Many Requests Error
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Comienza en vendor/microsoft/kiota-http-guzzle/src/Middleware/RetryHandler.php alrededor de la línea 298 y reproduce la respuesta 429 de solicitudes de búsqueda simultáneas de OneDrive. Verifica el manejo de un valor de Retry-After como "60,120" y confirma que la solicitud puede reintentarse o producir una excepción HTTP adecuada en lugar del error de análisis.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The issue arises after encountering a 429 Too Many Requests error, which likely returns an incorrect Retry-After header value like 60,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.
This bug was also observed in the Python version of the SDK and has been resolved by splitting the value on the comma, and using only the first of the two resulting values.
Expected behavior
- Server returns proper Retry After value
- Client is able to properly parse value & retry request or if still gets 429, throw an appropriate HTTP exception.
How to reproduce
- Trigger a 429 Too Many Requests error by sending multple simultaneous requests to onedrive search endpoint
me/drive/root/search(q='t') - Observe that the Retry-After header contains the value "60,120".
- The retry handler fails with the error
Fatal error: Uncaught exception "RuntimeException" with message "Unable to parse Retry-After header value 60,120" File: /var/www/html/vendor/microsoft/kiota-http-guzzle/src/Middleware/RetryHandler.php on line 298
SDK Version
2.4.0
Latest version known to work for scenario above?
No response
Known Workarounds
None
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- Lenguaje dominante
- PHP
- Estrellas
- 16
- Forks
- 8
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoftgraph/msgraph-sdk-php-core
-
status:waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoftgraph/msgraph-sdk-php-core#227 · 2 comentarios · 1 reacción ·
-
status:waiting-for-triage type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
-
area:authentication goodfirstissue type:enhancement
microsoftgraph/msgraph-sdk-php-core#202 · 4 comentarios · 1 asignado ·
-
type:feature
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
microsoftgraph/msgraph-sdk-php-core#195 · 2 comentarios ·
-
microsoftgraph/msgraph-sdk-php-core#132 · 1 comentario · 1 asignado ·
Todos los issues de microsoftgraph/msgraph-sdk-php-core
Issues similares
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
Перевод устарел
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
priority: p3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nextcloud/fulltextsearch#1011 ·