Skip to content

Commit 9577af9

Browse files
Exceptions
1 parent a62ebf8 commit 9577af9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/LookupFromIndexService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.elasticsearch.search.internal.AliasFilter;
2929
import org.elasticsearch.tasks.TaskId;
3030
import org.elasticsearch.transport.TransportService;
31-
import org.elasticsearch.xpack.esql.VerificationException;
31+
import org.elasticsearch.xpack.esql.EsqlIllegalArgumentException;
3232
import org.elasticsearch.xpack.esql.action.EsqlQueryAction;
3333
import org.elasticsearch.xpack.esql.core.expression.NamedExpression;
3434
import org.elasticsearch.xpack.esql.core.tree.Source;
@@ -201,8 +201,7 @@ public void writeTo(StreamOutput out) throws IOException {
201201
if (out.getTransportVersion().onOrAfter(TransportVersions.JOIN_ON_ALIASES)) {
202202
out.writeString(indexPattern);
203203
} else if (indexPattern.equals(shardId.getIndexName()) == false) {
204-
// TODO can we throw exceptions here?
205-
throw new VerificationException("Aliases and index patterns are not allowed for LOOKUP JOIN []", indexPattern);
204+
throw new EsqlIllegalArgumentException("Aliases and index patterns are not allowed for LOOKUP JOIN []", indexPattern);
206205
}
207206

208207
out.writeString(inputDataType.typeName());

0 commit comments

Comments
 (0)