Skip to content

Commit

Permalink
Issue helidon-io#4719 - Helidon DB Client does not trigger an Excepti…
Browse files Browse the repository at this point in the history
…on when no sane DB connection can be obtained

Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
  • Loading branch information
Tomas-Kraus committed Aug 30, 2022
1 parent 3cfc643 commit c7a58aa
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 c7a58aa

Please sign in to comment.