`ValueError` would be more appropriate. `ElasticHostsException` should only be used for HTTP exceptions.