From 6d065d363a20af990ddb520c84716a7f57f7cec2 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:16:04 -0700 Subject: [PATCH] Handle JSONDecodeError in is_server_or_retry_error function (#133) feat: handle JSONDecodeError in is_server_or_retry_error function --- graphiti_core/llm_client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphiti_core/llm_client/client.py b/graphiti_core/llm_client/client.py index 4c53dd90..fe5e9177 100644 --- a/graphiti_core/llm_client/client.py +++ b/graphiti_core/llm_client/client.py @@ -35,7 +35,7 @@ logger = logging.getLogger(__name__) def is_server_or_retry_error(exception): - if isinstance(exception, RateLimitError): + if isinstance(exception, (RateLimitError, json.decoder.JSONDecodeError)): return True return (