lib/Elastica/Exception/ResponseException.php
public function getElasticsearchException(): ElasticsearchException
    {
        $response = $this->getResponse();

        return new ElasticsearchException($response->getStatus(), $response->getErrorMessage());
    }
public function getElasticsearchException(): ElasticsearchException
    {
        $response = $this->getResponse();

        return new ElasticsearchException($response->getStatus(), $response->getErrorMessage());
    }
public function getElasticsearchException ( ) : ElasticsearchException { $ response = $ this -> getResponse ( ) ; return new ElasticsearchException ( $ response -> getStatus ( ) , $ response -> getErrorMessage ( ) ) ; }
Returns elasticsearch exception.

@return ElasticsearchException
Returns elasticsearch exception .