protected function throwResponseException()
    {
        if (null === $this->data) {
            throw new ResponseException('Undecodable response was returned.');
        }

        if (isset($this->data['error'], $this->data['message'])) {
            throw new ResponseException($this->data['message'], $this->data['error']);
        }

        throw new ResponseException('Unknown error');
    }