SubQuery is an Open, Flexible, Fast and Universal data indexing framework for web3. Our mission is to help developers create the decentralised products of the future.
[x] Did you search for an existing issue or pull request?
Description
When using multiple websocket endpoints, if one of the socket is closed or throws an error, the indexer would crash.
Details
To reproduce, use two endpoints, one does not connect and one that does. When running it, it should throw a connection error.
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Connection attempt timed out after 10009 ms".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Steps to Reproduce
This can be replicated with any subquery project, just need to find a non-connecting endpoint and a connecting on (websocket)
Expected behavior: [What you expected to happen]
Indexer should not crash even if one of the endpoints is broken
Actual behavior: [What actually happened]
Indexer crashes if one of the endpoints is broken
Any other information
Is there any other information you would like to add?
Prerequisites
Description
When using multiple websocket endpoints, if one of the socket is closed or throws an error, the indexer would crash.
Details
To reproduce, use two endpoints, one does not connect and one that does. When running it, it should throw a connection error.
Steps to Reproduce
This can be replicated with any subquery project, just need to find a non-connecting endpoint and a connecting on (websocket) Expected behavior: [What you expected to happen] Indexer should not crash even if one of the endpoints is broken Actual behavior: [What actually happened] Indexer crashes if one of the endpoints is broken
Any other information
Is there any other information you would like to add?