From 395195ac3cd3f45578060b012acbb78cd22d5f58 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 21 May 2021 09:31:45 -0230 Subject: [PATCH] Capture exception instead of throw error in useTransactionDisplayData (#11153) --- ui/hooks/useTransactionDisplayData.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/hooks/useTransactionDisplayData.js b/ui/hooks/useTransactionDisplayData.js index d739032fb..1fad5d2c7 100644 --- a/ui/hooks/useTransactionDisplayData.js +++ b/ui/hooks/useTransactionDisplayData.js @@ -1,4 +1,5 @@ import { useSelector } from 'react-redux'; +import { captureException } from '@sentry/browser'; import { getKnownMethodData } from '../selectors/selectors'; import { getStatusKey, @@ -221,8 +222,10 @@ export function useTransactionDisplayData(transactionGroup) { title = t('send'); subtitle = t('toAddress', [shortenAddress(recipientAddress)]); } else { - throw new Error( - `useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`, + captureException( + Error( + `useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`, + ), ); }