From 90c4909afb4abf2f8ff28494b67c9e921f57802c Mon Sep 17 00:00:00 2001 From: HeesungB Date: Wed, 21 Dec 2022 00:15:44 +0900 Subject: [PATCH] Add sentry capture errors --- pages/verification/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/verification/index.tsx b/pages/verification/index.tsx index 1ca5caa..e0b6b58 100644 --- a/pages/verification/index.tsx +++ b/pages/verification/index.tsx @@ -68,6 +68,7 @@ import Axios from "axios"; import { BackButton } from "../../components/back-button"; import { FinalCheckModal } from "../../components/final-check-modal"; import { ErrorModal } from "../../components/error-modal"; +import { captureException } from "@sentry/nextjs"; export default function VerificationPage() { const router = useRouter(); @@ -462,6 +463,7 @@ export default function VerificationPage() { return; } + captureException(error); setErrorMessage({ message: (error?.response?.data as QueryError).message, }); @@ -471,6 +473,7 @@ export default function VerificationPage() { if (error instanceof Error) { console.log(error.message); + captureException(error); setErrorMessage({ message: error.message }); setErrorModalOpen(true);