Skip to content

Commit a75341b

Browse files
Capture no contract info exception (#2342)
* Capture no contract info exception * Format
1 parent 3c1faf5 commit a75341b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pages/[chainSlug]/[...paths].tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { DeprecatedAlert } from "components/shared/DeprecatedAlert";
4444
import { Chain } from "@thirdweb-dev/chains";
4545
import { getContract } from "thirdweb";
4646
import { defineDashboardChain, thirdwebClient } from "lib/thirdweb-client";
47+
import * as Sentry from "@sentry/nextjs";
4748

4849
type EVMContractProps = {
4950
contractInfo?: EVMContractInfo;
@@ -173,6 +174,12 @@ const ContractPage: ThirdwebNextPage = () => {
173174
[activeTab, routes],
174175
);
175176

177+
if (!contractInfo) {
178+
Sentry.captureException(
179+
new Error("Contract info not found in EVMContractInfoProvider"),
180+
);
181+
}
182+
176183
if (chainNotFound) {
177184
return (
178185
<HomepageSection maxW="container.md" mx="auto">

0 commit comments

Comments
 (0)