Skip to content

Commit

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

Signed-off-by: Tomas Kraus <[email protected]>
  • Loading branch information
Tomas-Kraus authored Sep 30, 2022
1 parent af2c032 commit 8ec4cab
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 8ec4cab

Please sign in to comment.