protected function setErrors($response)
    {
        libxml_use_internal_errors(true);

        $doc = new \DOMDocument('1.0', 'utf-8');
        $doc->loadXML($response);

        $errors = libxml_get_errors();
        if (!empty($errors)) {
            $this->errors[] = 'Xml response is invalid';
        }

        return $this;
    }