-
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): Fix Error-Retrying Mechanism (#760)
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Fix error-retrying mechanism by updating retryable error logic and interceptors, and adding retry to utility function. > > - **Error Handling**: > - Change logic to retry on known errors in `tasks.py` by introducing `RETRYABLE_ERROR_TYPES` and `RETRYABLE_HTTP_STATUS_CODES`. > - Update `is_retryable_error()` to return `True` for retryable errors and specific HTTP status codes. > - **Interceptors**: > - Modify `CustomActivityInterceptor` and `CustomWorkflowInterceptor` in `interceptors.py` to use `is_retryable_error()`. > - **Utilities**: > - Add retry mechanism to `cozo_query_dec()` in `utils.py` using `tenacity` to handle `HTTPException` with status code 429. > > <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 2943e26. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: HamadaSalhab <[email protected]> Co-authored-by: Diwank Singh Tomer <[email protected]> Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2096347
commit f9a7ed5
Showing
4 changed files
with
154 additions
and
67 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
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