mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-29 06:33:28 +00:00
style: satisfy ruff format on exception_mapping_utils.py
This commit is contained in:
parent
9c1eb0ec33
commit
c2b5b09080
1 changed files with 1 additions and 3 deletions
|
|
@ -601,9 +601,7 @@ def _map_anthropic_exception(
|
|||
# Anthropic returns usage/spend-limit exhaustion typed as invalid_request_error (400),
|
||||
# but per the exception-mapping docs it should surface as a RateLimitError (429). Check
|
||||
# before the generic 400 branches below, which would otherwise map it to BadRequestError.
|
||||
if ExceptionCheckers.is_error_str_rate_limit(
|
||||
error_str, getattr(original_exception, "status_code", None)
|
||||
):
|
||||
if ExceptionCheckers.is_error_str_rate_limit(error_str, getattr(original_exception, "status_code", None)):
|
||||
raise RateLimitError(
|
||||
message=f"AnthropicError - {error_str}",
|
||||
model=model,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue