protected function parseResponse(ResponseInterface $response): string
    {
        $data = \GuzzleHttp\json_decode($response->getBody(), true);
        isset($data[0]) ? $this->setNotificationData($data) : $this->setData($data);
        $message = sprintf('HTTP %s Error %s', $response->getStatusCode(), $this->data['title']);
        if (isset($this->data['description'])) {
            $message .= sprintf(': %s', $this->getDescription());
        }

        return $message;
    }
protected function parseResponse(ResponseInterface $response): string
    {
        $data = \GuzzleHttp\json_decode($response->getBody(), true);
        isset($data[0]) ? $this->setNotificationData($data) : $this->setData($data);
        $message = sprintf('HTTP %s Error %s', $response->getStatusCode(), $this->data['title']);
        if (isset($this->data['description'])) {
            $message .= sprintf(': %s', $this->getDescription());
        }

        return $message;
    }
protected function parseResponse ( ResponseInterface $ response ) : string { $ data = \ GuzzleHttp \ json_decode ( $ response -> getBody ( ) , true ) ; isset ( $ data [ 0 ] ) ? $ this -> setNotificationData ( $ data ) : $ this -> setData ( $ data ) ; $ message = sprintf ( 'HTTP %s Error %s' , $ response -> getStatusCode ( ) , $ this -> data [ 'title' ] ) ; if ( isset ( $ this -> data [ 'description' ] ) ) { $ message .= sprintf ( ': %s' , $ this -> getDescription ( ) ) ; } return $ message ; }
Parse a response into the exception.

@param \Psr\Http\Message\ResponseInterface $response The response exception.

@return string The message to use for the exception.
Parse a response into the exception .