diff --git a/server/src/main/java/org/elasticsearch/action/index/IndexAction.java b/server/src/main/java/org/elasticsearch/action/index/IndexAction.java index 4553d2c9039b8..3cb01be92e734 100644 --- a/server/src/main/java/org/elasticsearch/action/index/IndexAction.java +++ b/server/src/main/java/org/elasticsearch/action/index/IndexAction.java @@ -17,6 +17,9 @@ public class IndexAction extends ActionType { public static final String NAME = "indices:data/write/index"; private IndexAction() { - super(NAME, in -> { throw new UnsupportedOperationException(); }); + super(NAME, in -> { + assert false : "Might not be an IndexResponse!"; + return new IndexResponse(in); + }); } }