mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added context and help message to member linking with Stripe account error
no issue - When the customer cannot be imported because they are missing from linked Stripe account or the linked account is incorrect one, these new messages should provide a better clue about what has caused the error and how to act on it.
This commit is contained in:
parent
80fa891965
commit
c7648737ca
2 changed files with 10 additions and 1 deletions
|
@ -209,6 +209,11 @@ const members = {
|
|||
|
||||
// NOTE: failed to link Stripe customer/plan/subscription
|
||||
if (model && error.message && (error.message.indexOf('customer') || error.message.indexOf('plan') || error.message.indexOf('subscription'))) {
|
||||
if (error.message.indexOf('customer') && error.code === 'resource_missing') {
|
||||
error.context = i18n.t('errors.api.members.stripeCustomerNotFound.context');
|
||||
error.help = i18n.t('errors.api.members.stripeCustomerNotFound.help');
|
||||
}
|
||||
|
||||
const api = require('./index');
|
||||
|
||||
await api.members.destroy.query({
|
||||
|
|
|
@ -367,7 +367,11 @@
|
|||
},
|
||||
"members": {
|
||||
"memberNotFound": "Member not found.",
|
||||
"memberAlreadyExists": "Email address is already member."
|
||||
"memberAlreadyExists": "Email address is already member.",
|
||||
"stripeCustomerNotFound": {
|
||||
"context": "The customer does not exist in currently linked Stripe account.",
|
||||
"help": "Connect the correct Stripe account, and re-run the import."
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"tagNotFound": "Tag not found."
|
||||
|
|
Loading…
Reference in a new issue