Revert "refactor: clean up fresh tech debt in auth 401 detection, cooldown fallback lookup and bedrock guardrail billing"
Some checks are pending
LiteLLM Rust DB / db-queries (push) Waiting to run
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run

This reverts commit d497e02bbf.
This commit is contained in:
Devin AI 2026-10-28 08:05:46 +00:00
parent d497e02bbf
commit 2d9faecc66

View file

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