From f8ba91a297cfb5f9dc3a0900c0d1cd7ef018a047 Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Thu, 15 Sep 2022 20:38:52 +1000 Subject: [PATCH] Catch ValueError from nim-json-rpc --- ethers/providers/jsonrpc.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ethers/providers/jsonrpc.nim b/ethers/providers/jsonrpc.nim index 7ca644a..9419224 100644 --- a/ethers/providers/jsonrpc.nim +++ b/ethers/providers/jsonrpc.nim @@ -36,6 +36,10 @@ template convertError(body) = body except JsonRpcError as error: raiseProviderError(error.msg) + # Catch all ValueErrors for now, at least until JsonRpcError is actually + # raised. PR created: https://github.com/status-im/nim-json-rpc/pull/151 + except ValueError as error: + raiseProviderError(error.msg) # Provider