We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f98528 commit 1ba4b2cCopy full SHA for 1ba4b2c
ethers/providers/jsonrpc.nim
@@ -88,10 +88,16 @@ proc new*(
88
proc callImpl(
89
client: RpcClient,
90
call: string,
91
- args: JsonNode): Future[JsonNode] {.async: (raises: [JsonRpcProviderError]).} =
+ args: JsonNode): Future[JsonNode] {.async: (raises: [CancelledError, JsonRpcProviderError]).} =
92
+
93
+ var response: JsonString
94
+ try:
95
+ response = await client.call(call, %args)
96
+ except CancelledError as e:
97
+ raise e
98
+ except CatchableError as e:
99
+ raiseJsonRpcProviderError e.msg
100
- without response =? (await client.call(call, %args)).catch, error:
- raiseJsonRpcProviderError error.msg
101
without json =? JsonNode.fromJson(response.string), error:
102
raiseJsonRpcProviderError "Failed to parse response: " & error.msg
103
json
0 commit comments