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(); }); } }