From a6d9a5fe8a642f5014d0fd3f8f1c8267b8ad66cc Mon Sep 17 00:00:00 2001 From: Puneetha Date: Wed, 19 Jun 2019 17:05:05 +0100 Subject: [PATCH] Rethrow the Exception in SendHandler --- .../net/consensys/orion/http/handler/send/SendHandler.java | 3 +++ 1 file changed, 3 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 13bb3a09..55dc1102 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 @@ -116,6 +116,9 @@ public void handle(RoutingContext routingContext) { privacyGroupStorage.put(privacyGroupPayload).thenApply((result) -> { send(routingContext, sendRequest, fromKey, toKeys, privacyGroupPayload); return result; + }).exceptionally(e -> { + handleFailure(routingContext, e); + return null; }); } else if (sendRequest.privacyGroupId().isPresent()) { privacyGroupStorage.get(sendRequest.privacyGroupId().get()).thenApply((result) -> {