Elastica\Response::getFullError PHP Method

getFullError() public method

In case of http://localhost:9200/_alias/test the error is a string
public getFullError ( ) : array | string
return array | string Error data
    public function getFullError()
    {
        $response = $this->getData();
        if (isset($response['error'])) {
            return $response['error'];
        }
    }

Usage Example

 /**
  * @group unit
  */
 public function testArrayErrorMessage()
 {
     $response = new Response(json_encode(array('error' => array('a', 'b'))));
     $this->assertEquals(array('a', 'b'), $response->getFullError());
 }