Using `ElasticsearchIllegalArgumentException` instead would help set the status code of the response to "bad request" instead of "internal error".