Skip to content

Commit

Permalink
Fix code scanning alert no. 11: Information exposure through an excep…
Browse files Browse the repository at this point in the history
…tion

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 342552a commit 5c5ab32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/ee/billing/webhooks/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.http import JsonResponse
from ee.billing.stripe import map_stripe_plan_to_tier
import stripe
import logging
from api.models import Organisation

from django.conf import settings
Expand Down Expand Up @@ -105,7 +106,8 @@ def handle_subscription_deleted(event):
except Organisation.DoesNotExist:
return JsonResponse({"error": "Organisation not found"}, status=404)
except Exception as e:
return JsonResponse({"error": str(e)}, status=500)
logging.error("An error occurred: %s", str(e))
return JsonResponse({"error": "An internal error has occurred"}, status=500)


@csrf_exempt
Expand Down

0 comments on commit 5c5ab32

Please sign in to comment.