lib/Elastica/Bulk/ResponseSet.php
public function getError(): string
    {
        foreach ($this->getBulkResponses() as $bulkResponse) {
            if ($bulkResponse->hasError()) {
                return $bulkResponse->getError();
            }
        }

        return '';
    }
public function getError(): string
    {
        foreach ($this->getBulkResponses() as $bulkResponse) {
            if ($bulkResponse->hasError()) {
                return $bulkResponse->getError();
            }
        }

        return '';
    }
public function getError ( ) : string { foreach ( $ this -> getBulkResponses ( ) as $ bulkResponse ) { if ( $ bulkResponse -> hasError ( ) ) { return $ bulkResponse -> getError ( ) ; } } return '' ; }
Returns first found error.

@return string
Returns first found error .