mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Fix ruff errors
This commit is contained in:
parent
ed853e138f
commit
319180f650
1 changed files with 9 additions and 3 deletions
|
|
@ -2313,7 +2313,7 @@ def exception_type( # type: ignore # noqa: PLR0915
|
|||
else:
|
||||
# if no status code then it is an APIConnectionError: https://github.com/openai/openai-python#handling-errors
|
||||
raise APIConnectionError(
|
||||
message=f"{exception_provider} APIConnectionError - {message}\n{_redact_string(traceback.format_exc())}",
|
||||
message=f"{exception_provider} APIConnectionError - {message}\n{redact_string(traceback.format_exc()) if _ENABLE_SECRET_REDACTION else traceback.format_exc()}",
|
||||
llm_provider="azure",
|
||||
model=model,
|
||||
litellm_debug_info=extra_information,
|
||||
|
|
@ -2440,7 +2440,10 @@ def exception_type( # type: ignore # noqa: PLR0915
|
|||
else:
|
||||
raise APIConnectionError(
|
||||
message="{}\n{}".format(
|
||||
str(original_exception), _redact_string(traceback.format_exc())
|
||||
str(original_exception),
|
||||
redact_string(traceback.format_exc())
|
||||
if _ENABLE_SECRET_REDACTION
|
||||
else traceback.format_exc(),
|
||||
),
|
||||
llm_provider=custom_llm_provider,
|
||||
model=model,
|
||||
|
|
@ -2470,7 +2473,10 @@ def exception_type( # type: ignore # noqa: PLR0915
|
|||
raise e # it's already mapped
|
||||
raised_exc = APIConnectionError(
|
||||
message="{}\n{}".format(
|
||||
original_exception, _redact_string(traceback.format_exc())
|
||||
original_exception,
|
||||
redact_string(traceback.format_exc())
|
||||
if _ENABLE_SECRET_REDACTION
|
||||
else traceback.format_exc(),
|
||||
),
|
||||
llm_provider="",
|
||||
model="",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue