I'm using web3j to subscribe for transactions:

        Flowable<Transaction> observable =
        Scheduler scheduler = Schedulers.from(executor);
                observeOn(scheduler, false).
                subscribe(tx -> {
                    // do stuff..

It starts well but at some point (ocasionally) I'm getting a FilterException:

org.web3j.protocol.core.filters.FilterException: Error sending request

At the beginning it was due to UnknownHostException (solved that..) no it's do to java.io.InterruptedIOException: thread interrupted. Whenever the filter throws exception my observable (flowable in this case) stops working.

Is there a way to catch filter exceptions or is there anything I can do to keep my observable alive at all time?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.