Skip to content

Commit

Permalink
Issue #4719 - Helidon DB Client does not trigger an Exception when no…
Browse files Browse the repository at this point in the history
… sane DB connection can be obtained (#4772)

Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>

Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
  • Loading branch information
Tomas-Kraus authored Oct 4, 2022
1 parent c1d3a5c commit 625bbde
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ private Single<Long> doExecute(DbClientServiceContext dbContext,
CompletableFuture<Long> queryFuture) {

executorService().submit(() -> {
connection().thenAccept(conn -> callStatement(dbContext, conn, statementFuture, queryFuture));
connection()
.thenAccept(conn -> callStatement(dbContext, conn, statementFuture, queryFuture))
.exceptionally(t -> {
statementFuture.completeExceptionally(t);
queryFuture.completeExceptionally(t);
return null;
});
});

// the query future is reused, as it completes with the number of updated records
Expand Down

0 comments on commit 625bbde

Please sign in to comment.