Don't handle generic exception for the moment
This commit is contained in:
		
					parent
					
						
							
								981e68aa4f
							
						
					
				
			
			
				commit
				
					
						259c509113
					
				
			
		
					 1 changed files with 70 additions and 70 deletions
				
			
		|  | @ -136,7 +136,7 @@ def handle_webhook(request): | ||||||
|         if (invoice_obj.paid and |         if (invoice_obj.paid and | ||||||
|                 invoice_obj.billing_reason == "subscription_update"): |                 invoice_obj.billing_reason == "subscription_update"): | ||||||
|             logger.debug("Start provisioning") |             logger.debug("Start provisioning") | ||||||
|             try: |             # try: | ||||||
|             stripe_subscription_obj = stripe.Subscription.retrieve( |             stripe_subscription_obj = stripe.Subscription.retrieve( | ||||||
|                 invoice_obj.subscription) |                 invoice_obj.subscription) | ||||||
|             try: |             try: | ||||||
|  | @ -205,15 +205,15 @@ def handle_webhook(request): | ||||||
|                     'body': "Response = %s" % str(ex), |                     'body': "Response = %s" % str(ex), | ||||||
|                 } |                 } | ||||||
|                 send_plain_email_task.delay(email_data) |                 send_plain_email_task.delay(email_data) | ||||||
|             except Exception as ex: |             # except Exception as ex: | ||||||
|                 logger.error(str(ex)) |             #     logger.error(str(ex)) | ||||||
|                 email_data = { |             #     email_data = { | ||||||
|                     'subject': "invoice.paid Webhook error", |             #         'subject': "invoice.paid Webhook error", | ||||||
|                     'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, |             #         'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, | ||||||
|                     'to': settings.DCL_ERROR_EMAILS_TO_LIST, |             #         'to': settings.DCL_ERROR_EMAILS_TO_LIST, | ||||||
|                     'body': "Response = %s" % str(ex), |             #         'body': "Response = %s" % str(ex), | ||||||
|                 } |             #     } | ||||||
|                 send_plain_email_task.delay(email_data) |             #     send_plain_email_task.delay(email_data) | ||||||
|     else: |     else: | ||||||
|         logger.error("Unhandled event : " + event.type) |         logger.error("Unhandled event : " + event.type) | ||||||
|     return HttpResponse(status=200) |     return HttpResponse(status=200) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue