From 48e3552e1aefd6dcab0e69c0cabe79ec278c8ec2 Mon Sep 17 00:00:00 2001 From: Christian Krakau-Louis Date: Sun, 8 Mar 2026 16:27:53 +0100 Subject: [PATCH] Potential fix for code scanning alert no. 333: 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/api/billing.py b/app/api/billing.py index b8db5454..a1fc7cf1 100644 --- a/app/api/billing.py +++ b/app/api/billing.py @@ -448,7 +448,14 @@ async def stripe_sync_plans(request: Request, db: Session = Depends(get_db)) -> except Exception as exc: db.rollback() logger.error("Stripe sync failed for plan %s: %s", plan.plan_id, exc) - results.append({"plan_id": plan.plan_id, "name": plan.name, "status": "error", "detail": str(exc)}) + results.append( + { + "plan_id": plan.plan_id, + "name": plan.name, + "status": "error", + "detail": "Internal error while syncing this plan with Stripe.", + } + ) return {"results": results}