Add ProxyAuthenticationException for proxy unauth 401s

This commit is contained in:
rahul dhanawade 2026-02-05 23:15:34 +05:30
parent 1017c3a0e4
commit 9a4cfc404b
2 changed files with 7 additions and 0 deletions

View file

@ -3000,6 +3000,12 @@ class ProxyException(Exception):
error_dict["provider_specific_fields"] = self.provider_specific_fields
return error_dict
class ProxyAuthenticationException(ProxyException):
"""
Expected auth error (401) for invalid or missing proxy token.
Logged as unauthenticated, not as an internal crash.
"""
pass
class CommonProxyErrors(str, enum.Enum):
db_not_connected_error = (

View file

@ -48,6 +48,7 @@ from litellm.proxy._types import (
LitellmUserRoles,
NewTeamRequest,
ProxyErrorTypes,
ProxyAuthenticationException,
ProxyException,
RoleBasedPermissions,
SpecialModelNames,