From 739dbb90886d73f23855293c71d6a37d74e48a75 Mon Sep 17 00:00:00 2001 From: Jan Martiska Date: Tue, 14 Nov 2023 09:01:58 +0100 Subject: [PATCH] Properly fail a single-result operation over WS when the WS connection fails --- .../graphql/client/vertx/dynamic/VertxDynamicGraphQLClient.java | 2 +- .../client/vertx/typesafe/VertxTypesafeGraphQLClientProxy.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/dynamic/VertxDynamicGraphQLClient.java b/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/dynamic/VertxDynamicGraphQLClient.java index d77e8d159..5c90b3469 100644 --- a/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/dynamic/VertxDynamicGraphQLClient.java +++ b/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/dynamic/VertxDynamicGraphQLClient.java @@ -460,7 +460,7 @@ private Uni executeSingleResultOperationOverWebsocket(JsonObject json) webSocketHandler().subscribe().with(handler -> { handlerRef.set(handler); operationId.set(handler.executeUni(json, rawEmitter)); - }); + }, rawEmitter::fail); }); return rawUni .onCancellation().invoke(() -> { diff --git a/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/typesafe/VertxTypesafeGraphQLClientProxy.java b/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/typesafe/VertxTypesafeGraphQLClientProxy.java index 8d5970b70..1a789634a 100644 --- a/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/typesafe/VertxTypesafeGraphQLClientProxy.java +++ b/client/implementation-vertx/src/main/java/io/smallrye/graphql/client/vertx/typesafe/VertxTypesafeGraphQLClientProxy.java @@ -215,7 +215,7 @@ private Uni executeSingleResultOperationOverWebsocket(MethodInvocation m webSocketHandler().subscribe().with((handler) -> { handlerRef.set(handler); operationId.set(handler.executeUni(request, rawEmitter)); - }); + }, rawEmitter::fail); }); return rawUni .onCancellation().invoke(() -> {