mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Add Stripe error message to Sentry data
This commit is contained in:
parent
e0eddc7db8
commit
b9f23e7714
1 changed files with 7 additions and 3 deletions
|
|
@ -380,9 +380,13 @@ export const createStripeAccount = payoutDetails => (dispatch, getState, sdk) =>
|
|||
.then(() => {
|
||||
dispatch(stripeAccountCreateSuccess(accountResponse));
|
||||
})
|
||||
.catch(e => {
|
||||
dispatch(stripeAccountCreateError(storableError(e)));
|
||||
log.error(e, 'create-stripe-account-failed');
|
||||
.catch(err => {
|
||||
const e = storableError(err);
|
||||
dispatch(stripeAccountCreateError(e));
|
||||
const stripeMessage = e.apiErrors && e.apiErrors.length > 0 && e.apiErrors[0].meta
|
||||
? e.apiErrors[0].meta.stripe_message
|
||||
: null;
|
||||
log.error(err, 'create-stripe-account-failed', { stripeMessage });
|
||||
throw e;
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue