From 24c39648f0d7aedbf2659c8e80702d3716d9a1e6 Mon Sep 17 00:00:00 2001 From: rahul dhanawade Date: Thu, 5 Feb 2026 23:24:47 +0530 Subject: [PATCH] Use ProxyAuthenticationException in get_key_object for token not found --- litellm/proxy/auth/auth_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py index 1638f93e75d..9f419bfad18 100644 --- a/litellm/proxy/auth/auth_checks.py +++ b/litellm/proxy/auth/auth_checks.py @@ -1798,7 +1798,7 @@ async def get_key_object( ) if _valid_token is None: - raise ProxyException( + raise ProxyAuthenticationException( message="Authentication Error, Invalid proxy server token passed. key={}, not found in db. Create key via `/key/generate` call.".format( hashed_token ),