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

Added sentry to support error on Portal (#20890)

ref PLG-204

- Added a sentry capture so we know when and if the support error
component gets triggered.
This commit is contained in:
Ronald Langeveld 2024-09-02 16:58:22 +09:00 committed by GitHub
parent 0f8fd441c7
commit b62baa8b0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@ import AppContext from '../../AppContext';
import CloseButton from '../common/CloseButton';
import ActionButton from '../common/ActionButton';
import {ReactComponent as WarningIcon} from '../../images/icons/warning-outline.svg';
import * as Sentry from '@sentry/react';
export const TipsAndDonationsErrorStyle = `
.gh-portal-tips-and-donations .gh-tips-and-donations-icon-error {
@ -29,6 +30,10 @@ const SupportError = ({error}) => {
const errorMessage = error || t('There was an error processing your payment. Please try again.');
const buttonLabel = t('Close');
if (error) { // Log error to Sentry
Sentry.captureException(error);
}
return (
<div className='gh-portal-content gh-portal-tips-and-donations'>
<CloseButton />