diff --git a/reactive/dbclient/jdbc/src/main/java/io/helidon/reactive/dbclient/jdbc/JdbcStatementDml.java b/reactive/dbclient/jdbc/src/main/java/io/helidon/reactive/dbclient/jdbc/JdbcStatementDml.java index 02ec4202772..9463a5f617f 100644 --- a/reactive/dbclient/jdbc/src/main/java/io/helidon/reactive/dbclient/jdbc/JdbcStatementDml.java +++ b/reactive/dbclient/jdbc/src/main/java/io/helidon/reactive/dbclient/jdbc/JdbcStatementDml.java @@ -54,7 +54,13 @@ private Single doExecute(DbClientServiceContext dbContext, CompletableFuture 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