mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Wrapped getCustomer in try catch
no-issue This protects against live/test mode poisoned databases
This commit is contained in:
parent
d1b29fd0b7
commit
48cb8d14da
1 changed files with 7 additions and 3 deletions
|
@ -141,9 +141,13 @@ module.exports = class StripePaymentProcessor {
|
||||||
const metadata = await this.storage.get(member);
|
const metadata = await this.storage.get(member);
|
||||||
|
|
||||||
for (const data in metadata) {
|
for (const data in metadata) {
|
||||||
const customer = await this.getCustomer(data.customer_id);
|
try {
|
||||||
if (!customer.deleted) {
|
const customer = await this.getCustomer(data.customer_id);
|
||||||
return customer;
|
if (!customer.deleted) {
|
||||||
|
return customer;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue