Skip to content

Commit 2c213f8

Browse files
committed
Usage of Exception instead of ElasticsearchException in convertBodyToString
1 parent 405b1e6 commit 2c213f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Elasticsearch/Connections/Connection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
use Elasticsearch\Common\Exceptions\TransportException;
3838
use Elasticsearch\Serializers\SerializerInterface;
3939
use Elasticsearch\Transport;
40+
use Exception;
4041
use GuzzleHttp\Ring\Core;
4142
use GuzzleHttp\Ring\Exception\ConnectException;
4243
use GuzzleHttp\Ring\Exception\RingException;
@@ -678,7 +679,7 @@ private function process5xxError(array $request, array $response, array $ignore)
678679
throw $exception;
679680
}
680681

681-
private function convertBodyToString($body, int $statusCode, ElasticsearchException $exception) : string
682+
private function convertBodyToString($body, int $statusCode, Exception $exception) : string
682683
{
683684
if (empty($body)) {
684685
return sprintf(

0 commit comments

Comments
 (0)