src/Http/HttpPlugHttpAdapterClient.php
private function buildRequestError(PlugException $e)
    {
        $data    = $e->getResponse() ? json_decode($e->getResponse()->getBody(), true) : ['error' => $e->getMessage()];
        $message = isset($data['error']) ? $data['error'] : 'Server Error';
        $status  = $e->getResponse() ? $e->getResponse()->getStatusCode() : 500;

        return new CommunicationException(sprintf('%s : %s', $status, $message));
    }
private function buildRequestError(PlugException $e)
    {
        $data    = $e->getResponse() ? json_decode($e->getResponse()->getBody(), true) : ['error' => $e->getMessage()];
        $message = isset($data['error']) ? $data['error'] : 'Server Error';
        $status  = $e->getResponse() ? $e->getResponse()->getStatusCode() : 500;

        return new CommunicationException(sprintf('%s : %s', $status, $message));
    }
private function buildRequestError ( PlugException $ e ) { $ data = $ e -> getResponse ( ) ? json_decode ( $ e -> getResponse ( ) -> getBody ( ) , true ) : [ 'error' => $ e -> getMessage ( ) ] ; $ message = isset ( $ data [ 'error' ] ) ? $ data [ 'error' ] : 'Server Error' ; $ status = $ e -> getResponse ( ) ? $ e -> getResponse ( ) -> getStatusCode ( ) : 500 ; return new CommunicationException ( sprintf ( '%s : %s' , $ status , $ message ) ) ; }
builds the error exception.

@param PlugException $e

@return CommunicationException
builds the error exception .