davidmoten / davidmoten/rxjava2-jdbc

Connection Timeout not caught by doOnError()

Open
#27 22 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
394
Forks
41
Avg merge
2m
Merged PRs (30d)
1

Description

Hello, i have a problem with handling ConnectionTimeout. Look at this code:

```
RxJava2Adapter.flowableToFlux(dao.getAll().doOnError(e->log.error("THIS IS AN ERROR")))
.subscribeOn(elastic).log()
.publishOn(parallel).log()
.publish();
```

where dao.getAll() call is:
```
public Flowable getAll(){
Database db = Database.nonBlocking().connectionProvider(db2Config.dataSource()).build();
return db.select("select * from TABLE_A where ID=:id")
.parameter("id","20160512205855_8203501_299566")
.autoMap(Transit.class);
}
```
Now, if there is a connection timeout, no doOnError will catch the exception. After some debugging i noticed that the error is captured by RxJava2 default error handler.

There is a way to propagate the onError signal up to our stream?

Thank you,

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.