mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(proxy_server.py): fix callback check order
This commit is contained in:
parent
9c6080be1a
commit
d528b66db0
3 changed files with 185 additions and 9 deletions
|
@ -601,10 +601,14 @@ class ProxyLogging:
|
|||
"litellm_logging_obj", None
|
||||
)
|
||||
|
||||
if (
|
||||
isinstance(original_exception, HTTPException)
|
||||
and litellm_logging_obj is not None
|
||||
):
|
||||
if isinstance(original_exception, HTTPException):
|
||||
if litellm_logging_obj is None:
|
||||
litellm_logging_obj, data = litellm.utils.function_setup(
|
||||
original_function="IGNORE_THIS",
|
||||
rules_obj=litellm.utils.Rules(),
|
||||
start_time=datetime.now(),
|
||||
**request_data,
|
||||
)
|
||||
# log the custom exception
|
||||
await litellm_logging_obj.async_failure_handler(
|
||||
exception=original_exception,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue