diff --git a/explorer/src/pages/EpochDetailsPage.tsx b/explorer/src/pages/EpochDetailsPage.tsx
index 671f1079b..630f52138 100644
--- a/explorer/src/pages/EpochDetailsPage.tsx
+++ b/explorer/src/pages/EpochDetailsPage.tsx
@@ -8,6 +8,7 @@ import { Epoch } from "components/common/Epoch";
import { Slot } from "components/common/Slot";
import { useEpoch, useFetchEpoch } from "providers/epoch";
import { displayTimestampUtc } from "utils/date";
+import { FetchStatus } from "providers/cache";
type Props = { epoch: string };
export function EpochDetailsPage({ epoch }: Props) {
@@ -58,6 +59,9 @@ function EpochOverviewCard({ epoch }: OverviewProps) {
if (epoch > currentEpoch) {
return ;
} else if (!epochState?.data) {
+ if (epochState?.status === FetchStatus.FetchFailed) {
+ return ;
+ }
return ;
}
diff --git a/explorer/src/providers/epoch.tsx b/explorer/src/providers/epoch.tsx
index e39419509..25a5e1624 100644
--- a/explorer/src/providers/epoch.tsx
+++ b/explorer/src/providers/epoch.tsx
@@ -1,8 +1,8 @@
import React from "react";
-import * as Sentry from "@sentry/react";
import * as Cache from "providers/cache";
import { Connection, EpochSchedule } from "@solana/web3.js";
import { useCluster, Cluster } from "./cluster";
+import { reportError } from "utils/sentry";
export enum FetchStatus {
Fetching,
@@ -121,7 +121,7 @@ export async function fetchEpoch(
} catch (err) {
status = FetchStatus.FetchFailed;
if (cluster !== Cluster.Custom) {
- Sentry.captureException(err, { tags: { url } });
+ reportError(err, { epoch: epoch.toString() });
}
}