style: apply Black formatting to auth_exception_handler

This commit is contained in:
wangjifeng 2026-04-24 20:57:11 +08:00
parent c7e3e50851
commit 089bbf58d2

View file

@ -81,9 +81,7 @@ class UserAPIKeyAuthExceptionHandler:
# All other exceptions are unexpected and logged at ERROR with traceback.
_is_expected_auth_failure = (
isinstance(e, ProxyException) and int(e.code) in (401, 403)
) or (
isinstance(e, HTTPException) and e.status_code in (401, 403)
)
) or (isinstance(e, HTTPException) and e.status_code in (401, 403))
if _is_expected_auth_failure:
verbose_proxy_logger.warning(
"litellm.proxy.proxy_server.user_api_key_auth(): Auth denied - {}\nRequester IP Address:{}".format(