Skip to content

Commit 66f4e03

Browse files
committed
Log Stripe Resource fallback creation in Stripe
I hope this helps to track down an issue we are having with subscriptions.
1 parent 2e9cb8d commit 66f4e03

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

readthedocs/payments/forms.py

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ def ensure_stripe_resource(self, resource, attrs):
2727
del attrs['id']
2828
except KeyError:
2929
pass
30+
log.exception(
31+
'There was an error trying to retrieve a Stripe resource. '
32+
'Creating a new resource as a fallback. '
33+
'resource=%s attrs=%s',
34+
resource,
35+
attrs,
36+
)
3037
return resource.create(**attrs)
3138
else:
3239
for (key, val) in list(attrs.items()):

0 commit comments

Comments
 (0)