diff --git a/src/components/RegistrationLiteComponent.js b/src/components/RegistrationLiteComponent.js index e9e2deba..4a1fb4ca 100644 --- a/src/components/RegistrationLiteComponent.js +++ b/src/components/RegistrationLiteComponent.js @@ -138,7 +138,15 @@ const RegistrationLiteComponent = ({ title = 'Error'; break; } - Swal.fire(title, msg, icon) + + const stripeCode = exception?.error?.code || exception?.code; + const stripeMessage = exception?.error?.message || exception?.message || msg; + + const fullMsg = stripeCode ? `[${stripeCode}] ${stripeMessage}` : stripeMessage; + + Swal.fire(title, fullMsg, icon); + + Sentry.captureException(exception || new Error(fullMsg)); } const { getSettingByKey } = useMarketingSettings();