Skip to content

Commit 84a7fb9

Browse files
committed
Correct exception for missing nested path
1 parent ccfbf49 commit 84a7fb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/index/query/NestedQueryBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public static <E extends Exception> Query toQuery(
300300
if (ignoreUnmapped) {
301301
return new MatchNoDocsQuery();
302302
} else {
303-
throw new IllegalStateException("[" + NAME + "] failed to find nested object under path [" + path + "]");
303+
throw new QueryShardException(context, "[" + NAME + "] failed to find nested object under path [" + path + "]");
304304
}
305305
}
306306
final BitSetProducer parentFilter;

0 commit comments

Comments
 (0)