diff --git a/lib/client/constants.ts b/lib/client/constants.ts index 174a616e..64613a31 100644 --- a/lib/client/constants.ts +++ b/lib/client/constants.ts @@ -151,8 +151,11 @@ export const getAPIKeyForNetwork: Map = new Map([ export const getCurrentNetworkHttpUrl = (chainId: number) => { const httpUrl = getRpcHttpUrlForNetwork.get(chainId); - if (!httpUrl) - throw new Error(`No RPC URL was defined for chain ID: ${chainId}`); + if (!httpUrl) { + if (process.env.NODE_ENV === "production") + throw new Error(`No RPC URL was defined for chain ID: ${chainId}`); + else console.error(`No RPC URL was defined for chain ID: ${chainId}`); + } return httpUrl; };