forked from phoenix/litellm-mirror
fix(utils.py): handle anthropic overloaded error
This commit is contained in:
parent
369ddfb49e
commit
76785cfb6a
1 changed files with 4 additions and 1 deletions
|
@ -6787,7 +6787,10 @@ def exception_type(
|
||||||
llm_provider="anthropic",
|
llm_provider="anthropic",
|
||||||
model=model,
|
model=model,
|
||||||
)
|
)
|
||||||
elif original_exception.status_code == 500:
|
elif (
|
||||||
|
original_exception.status_code == 500
|
||||||
|
or original_exception.status_code == 529
|
||||||
|
):
|
||||||
exception_mapping_worked = True
|
exception_mapping_worked = True
|
||||||
raise litellm.InternalServerError(
|
raise litellm.InternalServerError(
|
||||||
message=f"AnthropicException - {error_str}. Handle with `litellm.InternalServerError`.",
|
message=f"AnthropicException - {error_str}. Handle with `litellm.InternalServerError`.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue