From f0f0cb71f09845c07ecb797636540befb2d2a6f6 Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Thu, 25 Jun 2026 12:46:35 +0530 Subject: [PATCH] fix(ui_sso): propagate ProxyException in upsert_sso_user and pass prisma_client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit upsert_sso_user had the same bare except-Exception swallowing pattern as get_user_info_from_db — the 403 from _enforce_free_sso_user_limit was caught and discarded. Also passes prisma_client through to insert_sso_user so the limit check actually runs. Co-Authored-By: Claude Sonnet 4.6 --- litellm/proxy/management_endpoints/ui_sso.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/proxy/management_endpoints/ui_sso.py b/litellm/proxy/management_endpoints/ui_sso.py index a32ae21d8c1..7777a0efe23 100644 --- a/litellm/proxy/management_endpoints/ui_sso.py +++ b/litellm/proxy/management_endpoints/ui_sso.py @@ -3014,8 +3014,11 @@ class SSOAuthenticationHandler: user_info = await insert_sso_user( result_openid=result, user_defined_values=user_defined_values, + prisma_client=prisma_client, ) return user_info + except ProxyException: + raise except Exception as e: verbose_proxy_logger.exception( f"Error upserting SSO user into LiteLLM DB: {e}"