{"record":{"id":"c1153f12ef517b39","repo":"t8y2/dbx","slug":"self-candidate-name-method-json-dumps-respon-c1153f","errorCode":null,"errorMessage":"{self.candidate.name} {method}: {json.dumps(response['error'], ensure_ascii=False)}","messagePattern":"\\{self\\.candidate\\.name\\} \\{method\\}: \\{json\\.dumps\\(response\\['error'\\], ensure_ascii=False\\)\\}","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/bench/agent_compare.py","lineNumber":106,"sourceCode":"            \"id\": request_id,\n            \"method\": method,\n            \"params\": params or {},\n        }\n        try:\n            assert self.process.stdin is not None\n            with self.write_lock:\n                self.process.stdin.write(json.dumps(request, separators=(\",\", \":\")) + \"\\n\")\n                self.process.stdin.flush()\n            response = response_queue.get(timeout=env_float(\"BENCH_RPC_TIMEOUT\", 180.0))\n        except queue.Empty as error:\n            raise TimeoutError(self._failure(f\"timed out during {method}\")) from error\n        finally:\n            with self.request_lock:\n                self.pending.pop(request_id, None)\n        if isinstance(response, Exception):\n            raise response\n        if response.get(\"error\") is not None:\n            raise RuntimeError(\n                f\"{self.candidate.name} {method}: \"\n                f\"{json.dumps(response['error'], ensure_ascii=False)}\"\n            )\n        return response.get(\"result\")\n\n    def rss_kib(self) -> int:\n        if self.candidate.rss_command:\n            output = subprocess.check_output(\n                self.candidate.rss_command,\n                shell=True,\n                text=True,\n            ).strip()\n            return int(output or \"0\")\n        status_path = Path(f\"/proc/{self.process.pid}/status\")\n        if status_path.is_file():\n            for line in status_path.read_text().splitlines():\n                if line.startswith(\"VmRSS:\"):\n                    return int(line.split()[1])","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/bench/agent_compare.py#L88-L124","documentation":"When the agent replies to an RPC with a non-null 'error' field, the harness wraps it in a RuntimeError prefixed with the candidate name and method, embedding the JSON-serialized error object. This is the harness's way of surfacing application-level failures reported by the agent (e.g. SQL errors, auth failures, unsupported features) rather than transport failures.","triggerScenarios":"Any RPC method returning {\"error\": ...} in its response — failed query execution, bad SQL, session not found, permission denied, unsupported method on that candidate driver.","commonSituations":"A candidate driver (e.g. jdbc-java) not supporting a method the hive-go agent supports; SQL syntax differences between backends; expired/invalid credentials; querying a non-existent table during a benchmark after a failed setup step.","solutions":["Read the embedded JSON error detail to identify the agent-side failure cause","Fix the underlying issue on the agent/database side (SQL, credentials, table setup)","Skip the unsupported method/candidate for drivers that don't implement it","Ensure setup steps (table creation, data load) completed before the benchmark runs"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"def check_rpc_ok(response: dict) -> dict:\n    if response.get(\"error\") is not None:\n        raise SystemExit(f\"agent returned error: {response['error']}\")\n    return response\n# inspect 'error' in the raw response before interpreting results","typeGuard":"def is_rpc_success(response: object) -> bool:\n    return isinstance(response, dict) and response.get(\"error\") is None","tryCatchPattern":"try:\n    result = process.call(\"execute_query\", params)\nexcept RuntimeError as e:\n    if e.args and e.args[0].startswith(process.candidate.name):\n        detail = e.args[0].split(\": \", 1)[-1]\n        print(f\"agent-side failure: {detail}\")  # fix SQL/creds/feature support\n    else:\n        raise","preventionTips":["Validate SQL and table existence before benchmark runs","Pre-verify credentials and permissions for each candidate","Probe feature support per candidate before running shared workloads","Always run setup (DDL + data load) and check it succeeded first"],"tags":["rpc","python","remote-error","subprocess"],"backgroundTag":"remote-rpc-error","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}