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:
parent
0f8fd441c7
commit
b62baa8b0b
1 changed files with 5 additions and 0 deletions
|
@ -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 />
|
||||
|
|
Loading…
Add table
Reference in a new issue