From d7d60832397f93e95faa76cae1e4dc0ecdeb8ba5 Mon Sep 17 00:00:00 2001 From: tawsifkamal Date: Mon, 10 Mar 2025 12:02:10 -0700 Subject: [PATCH] support for 500 error --- src/codegen/extensions/langchain/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen/extensions/langchain/graph.py b/src/codegen/extensions/langchain/graph.py index 3685ea322..e5116630f 100644 --- a/src/codegen/extensions/langchain/graph.py +++ b/src/codegen/extensions/langchain/graph.py @@ -63,7 +63,7 @@ def create(self, checkpointer: Optional[MemorySaver] = None, debug: bool = False # the retry policy has an initial interval, a backoff factor, and a max interval of controlling the # amount of time between retries retry_policy = RetryPolicy( - retry_on=[anthropic.RateLimitError, openai.RateLimitError], + retry_on=[anthropic.RateLimitError, openai.RateLimitError, anthropic.InternalServerError], max_attempts=10, initial_interval=30.0, # Start with 30 second wait backoff_factor=2, # Double the wait time each retry