0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

🐛 Fixed settings controller edit method

no-issue

This was because the API was recieving a default `null` value for the
stripe_connect_integration_token setting.

This also improves the logging for this error.
This commit is contained in:
Fabien O'Carroll 2020-06-02 18:58:30 +02:00
parent 0f6e23668c
commit 7c188ec1eb

View file

@ -131,7 +131,7 @@ module.exports = {
}
}
if (stripeConnectIntegrationToken) {
if (stripeConnectIntegrationToken && stripeConnectIntegrationToken.value) {
const getSessionProp = prop => frame.original.session[prop];
try {
const data = await membersService.stripeConnect.getStripeConnectTokenData(stripeConnectIntegrationToken.value, getSessionProp);
@ -141,6 +141,7 @@ module.exports = {
});
} catch (err) {
throw new BadRequestError({
err,
message: 'The Stripe Connect token could not be parsed.'
});
}