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 | ||||
|                 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) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue