From 363be7cbc5003d861f8b05492eb78ca5212eebc7 Mon Sep 17 00:00:00 2001 From: Puneetha Date: Mon, 17 Jun 2019 17:01:25 +0100 Subject: [PATCH] Rethrow the Exception in SendHandler in after getting privacy group. --- .../net/consensys/orion/http/handler/send/SendHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/consensys/orion/http/handler/send/SendHandler.java b/src/main/java/net/consensys/orion/http/handler/send/SendHandler.java index 44f85c8f..13bb3a09 100644 --- a/src/main/java/net/consensys/orion/http/handler/send/SendHandler.java +++ b/src/main/java/net/consensys/orion/http/handler/send/SendHandler.java @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; @@ -129,6 +130,9 @@ public void handle(RoutingContext routingContext) { .fail(new OrionException(OrionErrorCode.ENCLAVE_PRIVACY_GROUP_MISSING, "privacy group not found")); return result; } + }).exceptionally(e -> { + handleFailure(routingContext, e); + return Optional.empty(); }); } }