forked from LaconicNetwork/icns-frontend
Add sentry capture errors
This commit is contained in:
parent
bf0ee2ed66
commit
90c4909afb
@ -68,6 +68,7 @@ import Axios from "axios";
|
|||||||
import { BackButton } from "../../components/back-button";
|
import { BackButton } from "../../components/back-button";
|
||||||
import { FinalCheckModal } from "../../components/final-check-modal";
|
import { FinalCheckModal } from "../../components/final-check-modal";
|
||||||
import { ErrorModal } from "../../components/error-modal";
|
import { ErrorModal } from "../../components/error-modal";
|
||||||
|
import { captureException } from "@sentry/nextjs";
|
||||||
|
|
||||||
export default function VerificationPage() {
|
export default function VerificationPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -462,6 +463,7 @@ export default function VerificationPage() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
captureException(error);
|
||||||
setErrorMessage({
|
setErrorMessage({
|
||||||
message: (error?.response?.data as QueryError).message,
|
message: (error?.response?.data as QueryError).message,
|
||||||
});
|
});
|
||||||
@ -471,6 +473,7 @@ export default function VerificationPage() {
|
|||||||
|
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
console.log(error.message);
|
console.log(error.message);
|
||||||
|
captureException(error);
|
||||||
|
|
||||||
setErrorMessage({ message: error.message });
|
setErrorMessage({ message: error.message });
|
||||||
setErrorModalOpen(true);
|
setErrorModalOpen(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user