-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(agents-api): API calls with 429, etc should be retried (#657)
Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Enhance API call retry logic for specific HTTP status codes and improve error handling in `execute_api_call`. > > - **Behavior**: > - `execute_api_call` in `excecute_api_call.py` now retries on HTTP status codes 408, 429, 503, and 504. > - JSON parsing errors in `execute_api_call` are caught, logging a debug message and setting `json` to `None`. > - **Exceptions**: > - Removed `httpx.RequestError` and `httpx.HTTPStatusError` from `NON_RETRYABLE_ERROR_TYPES` in `tasks.py`. > - Updated `is_non_retryable_error` to retry on specific HTTP errors (408, 429, 503, 504). > - **Testing**: > - Added `workflow: tool call api_call test retry` test in `test_execution_workflow.py` to verify retry logic for specific HTTP status codes. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 9b3fa19. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: creatorrr <[email protected]>
- Loading branch information
Showing
3 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters