Skip to content

Commit 837452c

Browse files
committed
catch rpc exceptions in JsonRpcSubscription.new
1 parent fd16d71 commit 837452c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ethers/providers/jsonrpc.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ proc new*(_: type JsonRpcProvider,
9191
await initialized
9292
return subscriptions
9393

94-
initialized = initialize()
95-
JsonRpcProvider(client: awaitClient(), subscriptions: awaitSubscriptions())
94+
convertError:
95+
initialized = initialize()
96+
JsonRpcProvider(client: awaitClient(), subscriptions: awaitSubscriptions())
9697

9798
proc send*(provider: JsonRpcProvider,
9899
call: string,

0 commit comments

Comments
 (0)