Skip to content

Commit

Permalink
Merge pull request #7820 from readthedocs/humitos/resource-log-in-sentry
Browse files Browse the repository at this point in the history
Log Stripe Resource fallback creation in Stripe
  • Loading branch information
humitos authored Jan 12, 2021
2 parents 2e9cb8d + 66f4e03 commit cf199fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions readthedocs/payments/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()):
Expand Down

0 comments on commit cf199fd

Please sign in to comment.