We’re using Ghost (latest version) with Stripe to manage paid subscriptions to our content. I’m regularly following the log (eg. ghost log -f
) and noticed lots of instances of NotFoundError
while handling the webhook invoice.payment_failed:
[2021-05-15 10:13:11] INFO Handling webhook invoice.payment_failed
[2021-05-15 10:13:11] ERROR
NAME: NotFoundError
MESSAGE: No member found for customer cus_JTyrvxWd1xOqM5
level: normal
NotFoundError: No member found for customer cus_JTyrvxWd1xOqM5
at new NotFoundError (/var/www/ghost/versions/4.3.3/node_modules/@tryghost/members-api/node_modules/@tryghost/errors/node_modules/ghost-ignition/lib/errors/index.js:106:23)
at StripeWebhookService.invoiceEvent (/var/www/ghost/versions/4.3.3/node_modules/@tryghost/members-api/lib/services/stripe-webhook/index.js:176:19)
at async StripeWebhookService.handleWebhook (/var/www/ghost/versions/4.3.3/node_modules/@tryghost/members-api/lib/services/stripe-webhook/index.js:128:9)
at async /var/www/ghost/versions/4.3.3/node_modules/@tryghost/members-api/index.js:342:13
In addition, in Stripe’s log we notice a 50%+ error rate handling Ghost webhooks. Is there anything we can do to reduce this error rate on our site, or is this working as intended?
To me this looks like some sort of circular dependency: there is no member yet, as the payment hasn’t come through yet.