Don't handle generic exception for the moment

This commit is contained in:
PCoder 2020-12-23 14:02:27 +05:30
parent 981e68aa4f
commit 259c509113

View file

@ -136,7 +136,7 @@ def handle_webhook(request):
if (invoice_obj.paid and
invoice_obj.billing_reason == "subscription_update"):
logger.debug("Start provisioning")
try:
# try:
stripe_subscription_obj = stripe.Subscription.retrieve(
invoice_obj.subscription)
try:
@ -205,15 +205,15 @@ def handle_webhook(request):
'body': "Response = %s" % str(ex),
}
send_plain_email_task.delay(email_data)
except Exception as ex:
logger.error(str(ex))
email_data = {
'subject': "invoice.paid Webhook error",
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
'to': settings.DCL_ERROR_EMAILS_TO_LIST,
'body': "Response = %s" % str(ex),
}
send_plain_email_task.delay(email_data)
# except Exception as ex:
# logger.error(str(ex))
# email_data = {
# 'subject': "invoice.paid Webhook error",
# 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
# 'to': settings.DCL_ERROR_EMAILS_TO_LIST,
# 'body': "Response = %s" % str(ex),
# }
# send_plain_email_task.delay(email_data)
else:
logger.error("Unhandled event : " + event.type)
return HttpResponse(status=200)