protected function generateErrorResponse(PhpXmlRpc\Server $server, PhpXmlRpc\Response $r) {
        $this->response->addHeader('Content-Type', $r->content_type);
        $this->response->addHeader('Vary', 'Accept-Charset');
        
        $payload='<?xml version="1.0"?>';
        
        if(empty($r->payload)) {
            $r->serialize();
        }
        
        $payload=$payload.$r->payload;
        
        return $payload;
    }