private function getError($code, $id = null, $data = null)
    {
        return [
            'jsonrpc' => '2.0',
            'id' => $id,
            'error' => [
                'code' => $code,
                'message' => isset($this->errorMessages[$code]) ?
                    $this->errorMessages[$code] : $this->errorMessages[self::INTERNALERROR],
                'data' => $data,
            ],
        ];
    }