mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
Revert "refactor: clean up fresh tech debt in auth 401 detection, cooldown fallback lookup and bedrock guardrail billing"
This reverts commit d497e02bbf.
This commit is contained in:
parent
d497e02bbf
commit
2d9faecc66
1 changed files with 2 additions and 1 deletions
|
|
@ -53,7 +53,8 @@ def is_unauthorized_error(exception: BaseException | None) -> bool:
|
|||
if not isinstance(exception, (HTTPException, ProxyException)):
|
||||
return False
|
||||
|
||||
status_code: Final[object] = exception.code if isinstance(exception, ProxyException) else exception.status_code
|
||||
code: Final[object] = getattr(exception, "code", None)
|
||||
status_code: Final[object] = code if code is not None else getattr(exception, "status_code", None)
|
||||
return str(status_code) == str(status.HTTP_401_UNAUTHORIZED)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue