Skip to content

Commit 4e0e796

Browse files
committed
refactor: throw
1 parent fd28c2e commit 4e0e796

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/startup-checks/rpc.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ const checkRPC = async (url, chainId) => {
3636
console.info(`[checkRPC] [chainId=${chainId}] RPC ${domain} is working`);
3737
return { domain, chainId, success: true };
3838
} else {
39-
console.error(`[checkRPC] [chainId=${chainId}] Expected chainId ${chainId}, but got ${chainIdClient}`);
40-
return { domain, chainId, success: false };
39+
throw new Error(`Expected chainId ${chainId}, but got ${chainIdClient}`)
4140
}
4241
} catch (err) {
4342
console.error(`[checkRPC] [chainId=${chainId}] Error checking RPC ${domain}: ${err.message}`);

0 commit comments

Comments
 (0)