From 0bfe9bee547fc8ffa60bfbfc03691a37121d33b0 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 8 Aug 2024 17:17:41 -0700 Subject: [PATCH] fix(utils.py): handle anthropic overloaded error --- litellm/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index 35596c784c..e385d1bb3e 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -6787,7 +6787,10 @@ def exception_type( llm_provider="anthropic", model=model, ) - elif original_exception.status_code == 500: + elif ( + original_exception.status_code == 500 + or original_exception.status_code == 529 + ): exception_mapping_worked = True raise litellm.InternalServerError( message=f"AnthropicException - {error_str}. Handle with `litellm.InternalServerError`.",