Replies: 2 comments
-
I confirm, I guess no error are being catched with the listener. The logic with provider error handling seems to be missing almost completely, except for the message 'trying to reconnect in 1s", which does nothing |
Beta Was this translation helpful? Give feedback.
0 replies
-
Wondering if there are any updates here. I'm using a node that occasionally acts up, so being able to handle errors in my |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am wondering what would be the way to go about error handling for a provider instance when that instance is being used inside a contract instance for the purpose of event monitoring. For instance:
When all goes well, this code is fine, but what happens if I want to monitor provider errors, such as, for instance, an RPC server that returns a 429 status code while the event subscription is performing some polling? What would be the way of handling such errors to avoid process termination?
I have tried the following:
but that callback does not appear to get called when such an error occurs. So far, my experience with situations like that is that the process gets terminated because of an "unhandled" error.
There must be a way to handle those kinds of errors (i.e., errors occurring while "listening" for contract events that have been registered using the contract instance's ".on" method). Any help would be greatly appreciated! Thanks. :)
Edit: I'm using version
6.11.1
Beta Was this translation helpful? Give feedback.
All reactions