From 6cdca24333871877fef23fa0f1517ec8a268e9f3 Mon Sep 17 00:00:00 2001 From: Christian Krakau-Louis Date: Sun, 8 Mar 2026 18:11:38 +0100 Subject: [PATCH] Potential fix for code scanning alert no. 332: Information exposure through an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- app/api/billing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/api/billing.py b/app/api/billing.py index 8bb27284..6b0f20dd 100644 --- a/app/api/billing.py +++ b/app/api/billing.py @@ -313,8 +313,9 @@ async def stripe_status(request: Request, db: Session = Depends(get_db)) -> dict mode = "test" else: mode = "test" if settings.stripe_secret_key.startswith("sk_test_") else "live" - except Exception as exc: - connection_status = str(exc) + except Exception: + logger.exception("Stripe connection check failed") + connection_status = "error" mode = "test" if settings.stripe_secret_key.startswith("sk_test_") else "live" plans = db.query(SubscriptionPlan).order_by(SubscriptionPlan.sort_order).all()