fix(ui_sso): propagate ProxyException in upsert_sso_user and pass prisma_client

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 <noreply@anthropic.com>
This commit is contained in:
Sameer Kankute 2026-06-25 12:46:35 +05:30
parent 689e9d862f
commit f0f0cb71f0
No known key found for this signature in database

View file

@ -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}"