Replies: 2 comments 13 replies
-
@ricmoo would the best bet be to use a combination of both ethersjs and web3 to catch these errors? |
Beta Was this translation helpful? Give feedback.
-
@ricmoo to provide a little more context, I have a few Geth instances that my users connect to in a frontend application. If I need to prune an instance, it'll temporarily go down for a few hours. Currently, I use ethers.js exclusively, but it won't throw an error if they connect to the node while pruning. However, if I use Web3.js, I can throw an error and notify them that the node is down and they should use a different one. I'm just looking for a way to achieve this using only ethers |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following code using ethers js:
After 60 seconds my WebSocket connection is automatically closed, but an error isn't thrown. The program just silently stops. However, this similar code in
web3.js
does throw an error:Is it possible for
ethers.js
to throw on invalid WebSocket providers or providers where the connection has closed?Beta Was this translation helpful? Give feedback.
All reactions