mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
Handled subscription deletion errors with logging
refs https://github.com/TryGhost/Ghost/issues/11557 If a subscription failed to delete, we would error and bailout of the process, this updates it to log the error so that site owners have a record of the error in the logs, but also to continue through the rest of the subscriptions.
This commit is contained in:
parent
b435d6a8c1
commit
d63484e99a
@ -266,8 +266,13 @@ module.exports = class StripePaymentProcessor {
|
||||
});
|
||||
|
||||
for (const subscription of activeSubscriptions) {
|
||||
try {
|
||||
const updatedSubscription = await del(this._stripe, 'subscriptions', subscription.id);
|
||||
await this._updateSubscription(updatedSubscription);
|
||||
} catch (err) {
|
||||
this.logging.error(`There was an error cancelling subscription ${subscription.id}`);
|
||||
this.logging.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user