From cadbcfeb2404f2eb9be56c3d93d6517ae2e21e37 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Sat, 21 Sep 2013 21:44:35 +0200 Subject: [PATCH] Call validate in TransportClients before request is send --- .../org/elasticsearch/action/TransportActionNodeProxy.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/elasticsearch/action/TransportActionNodeProxy.java b/src/main/java/org/elasticsearch/action/TransportActionNodeProxy.java index ab3b86d801a..b6b0de94611 100644 --- a/src/main/java/org/elasticsearch/action/TransportActionNodeProxy.java +++ b/src/main/java/org/elasticsearch/action/TransportActionNodeProxy.java @@ -60,6 +60,11 @@ public class TransportActionNodeProxy listener) { + ActionRequestValidationException validationException = request.validate(); + if (validationException != null) { + listener.onFailure(validationException); + return; + } transportService.sendRequest(node, action.name(), request, transportOptions, new BaseTransportResponseHandler() { @Override public Response newInstance() {