Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix(healthcheck): add a catch
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Jan 9, 2024
1 parent d46d557 commit b01147f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ export const prefetchContracts = async () => {
return false;
});
}),
);
).catch((error: unknown) => {
const message = error instanceof Error ? error.message : error;
logger.error('Failed to prefetch contract state', {
error: message,
contractTxIds: prefetchContractTxIds,
});
return [false];
});
// update our healthcheck flag
successfullyPrefetchedContracts = prefetchResults.every(
(result) => result === true,
Expand Down

0 comments on commit b01147f

Please sign in to comment.