can we make this an `ElasticsearchIllegalStateException`?