mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-30 06:43:27 +00:00
fix: use int() cast when comparing ProxyException.code (code is str not int)
This commit is contained in:
parent
4bb6fc8f23
commit
c7e3e50851
1 changed files with 1 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ class UserAPIKeyAuthExceptionHandler:
|
|||
# flooding error logs with routine access-control events.
|
||||
# All other exceptions are unexpected and logged at ERROR with traceback.
|
||||
_is_expected_auth_failure = (
|
||||
isinstance(e, ProxyException) and e.code in (401, 403)
|
||||
isinstance(e, ProxyException) and int(e.code) in (401, 403)
|
||||
) or (
|
||||
isinstance(e, HTTPException) and e.status_code in (401, 403)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue