Private
Public Access
1
0

error catching

This commit is contained in:
Sander Roosendaal
2021-02-02 20:42:06 +01:00
parent 9fe3fd8340
commit b7e64f9198
2 changed files with 8 additions and 4 deletions

View File

@@ -53,9 +53,12 @@ from rowers.models import Rower,PaidPlan, CoachingGroup
from rowers.utils import ProcessorCustomerError
def webhook(request):
webhook_notification = gateway.webhook_notification.parse(
str(request.POST['bt_signature']),
request.POST['bt_payload'])
try:
webhook_notification = gateway.webhook_notification.parse(
str(request.POST['bt_signature']),
request.POST['bt_payload'])
except:
print(sys.exc_info())
# Example values for webhook notification properties
print(webhook_notification.kind) # "subscription_went_past_due"