Disable explorer block time fetching errors (#11931)

This commit is contained in:
Justin Starry 2020-08-31 17:39:26 +08:00 committed by GitHub
parent f385af25e5
commit af5084856a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -85,9 +85,11 @@ export async function fetchTransactionStatus(
try { try {
blockTime = await connection.getBlockTime(value.slot); blockTime = await connection.getBlockTime(value.slot);
} catch (error) { } catch (error) {
Sentry.captureException(error, { if (cluster === Cluster.MainnetBeta) {
tags: { slot: `${value.slot}`, url }, Sentry.captureException(error, {
}); tags: { slot: `${value.slot}` },
});
}
} }
let timestamp: Timestamp = let timestamp: Timestamp =
blockTime !== null ? blockTime : "unavailable"; blockTime !== null ? blockTime : "unavailable";