From 66f4e03d4dc198bfc253f8cf27e21c15872eed0b Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 12 Jan 2021 13:56:45 +0100 Subject: [PATCH] Log Stripe Resource fallback creation in Stripe I hope this helps to track down an issue we are having with subscriptions. --- readthedocs/payments/forms.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/readthedocs/payments/forms.py b/readthedocs/payments/forms.py index 6154f18a1f8..d3eea32748c 100644 --- a/readthedocs/payments/forms.py +++ b/readthedocs/payments/forms.py @@ -27,6 +27,13 @@ def ensure_stripe_resource(self, resource, attrs): del attrs['id'] except KeyError: pass + log.exception( + 'There was an error trying to retrieve a Stripe resource. ' + 'Creating a new resource as a fallback. ' + 'resource=%s attrs=%s', + resource, + attrs, + ) return resource.create(**attrs) else: for (key, val) in list(attrs.items()):