style: satisfy ruff format on exception_mapping_utils.py

This commit is contained in:
72004 2026-09-22 18:29:12 +05:00
parent 9c1eb0ec33
commit c2b5b09080

View file

@ -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,