forked from phoenix/litellm-mirror
test(test_batch_completions.py): handle anthropic overloaded error
This commit is contained in:
parent
7d38c62717
commit
4d7f4550e2
2 changed files with 3 additions and 1 deletions
|
@ -74,6 +74,8 @@ def test_batch_completion_models_all_responses():
|
||||||
assert len(responses) == 2
|
assert len(responses) == 2
|
||||||
except Timeout as e:
|
except Timeout as e:
|
||||||
pass
|
pass
|
||||||
|
except litellm.APIError as e:
|
||||||
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pytest.fail(f"An error occurred: {e}")
|
pytest.fail(f"An error occurred: {e}")
|
||||||
|
|
||||||
|
|
|
@ -7231,7 +7231,7 @@ def exception_type(
|
||||||
exception_mapping_worked = True
|
exception_mapping_worked = True
|
||||||
raise APIError(
|
raise APIError(
|
||||||
status_code=original_exception.status_code,
|
status_code=original_exception.status_code,
|
||||||
message=f"AnthropicException - {original_exception.message}",
|
message=f"AnthropicException - {original_exception.message}. Handle with `litellm.APIError`.",
|
||||||
llm_provider="anthropic",
|
llm_provider="anthropic",
|
||||||
model=model,
|
model=model,
|
||||||
request=original_exception.request,
|
request=original_exception.request,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue