{"record":{"id":"a79f4b4ba138bfb2","repo":"t8y2/dbx","slug":"unknown-method-s-a79f4b","errorCode":null,"errorMessage":"unknown method: %s","messagePattern":"unknown method: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/main.go","lineNumber":473,"sourceCode":"\t\tresult, err := server.executeQueryPage(queryOptionsFromParams(params), intParam(params, \"pageSize\"))\n\t\treturn result, false, err\n\tcase \"fetch_query_page\", \"fetch_table_read_page\":\n\t\tresult, err := server.fetchQueryPage(stringParam(params, \"sessionId\"), intParam(params, \"pageSize\"))\n\t\treturn result, false, err\n\tcase \"close_query_session\", \"close_table_read_session\":\n\t\treturn server.closeQuerySession(stringParam(params, \"sessionId\")), false, nil\n\tcase \"execute_transaction\":\n\t\tresult, err := server.executeStatements(params, true)\n\t\treturn result, false, err\n\tcase \"execute_batch\":\n\t\tresult, err := server.executeStatements(params, false)\n\t\treturn result, false, err\n\tcase \"disconnect\":\n\t\treturn map[string]bool{\"ok\": true}, false, server.disconnect()\n\tcase \"shutdown\":\n\t\treturn map[string]bool{\"ok\": true}, true, server.disconnect()\n\tdefault:\n\t\treturn nil, false, fmt.Errorf(\"unknown method: %s\", method)\n\t}\n}\n\nfunc handshakeResult(multiSession bool) map[string]any {\n\tcapabilities := []string{\n\t\t\"connect\", \"test_connection\", \"metadata\", \"query\", \"paged_query\", \"transaction\", \"ddl\", \"structured_error_v1\",\n\t}\n\tif multiSession {\n\t\tcapabilities = append(capabilities, \"multi_session\")\n\t}\n\treturn map[string]any{\n\t\t\"protocolVersion\":      protocolVersion,\n\t\t\"agentProtocolVersion\": protocolVersion,\n\t\t\"capabilities\":         capabilities,\n\t}\n}\n\nfunc testConnection(params connectParams) (map[string]any, error) {","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/main.go#L455-L491","documentation":"The agent's dispatch table maps JSON-RPC style method names to server handlers. When a client sends a method that isn't in the switch (validate_connection, list_tables, execute_query, shutdown, etc.), the server rejects it with 'unknown method: <name>'. This indicates a client/server protocol version mismatch or a typo in the method name.","triggerScenarios":"Sending any RPC method string not present in the dispatch switch in dispatch() — e.g. 'list_indexes_v2', a misspelled 'paged_query' style method, or a newer client calling a method this agent build doesn't implement.","commonSituations":"Client and agent built from different versions (client ahead of agent); typos in custom tooling that talks to the agent over stdio; feature flags enabling methods the deployed agent lacks.","solutions":["Check the method name spelling against the dispatch switch in agents/drivers/hive-go/main.go","Verify the client and agent versions match; upgrade the agent if the client expects newer methods","Check the handshake capabilities list to see which methods this agent advertises","Capture the exact method string from the error and compare to supported cases"],"exampleFix":"// before: calling an unadvertised method\n{\"method\": \"list_indexes_advanced\"}\n// after: use a supported method from the handshake capabilities\n{\"method\": \"list_tables\", \"params\": {\"schema\": \"default\"}}","handlingStrategy":"validation","validationCode":"const supported = handshakeCapabilities()\nif (!supported.methods.includes(methodName)) throw new Error(`method ${methodName} not advertised by agent`)","typeGuard":null,"tryCatchPattern":"try {\n    result = rpc.call(method, params)\n} catch (e) {\n    if (String(e).startsWith('unknown method:')) {\n        console.error(`${method} unsupported; refresh agent capabilities`)\n    }\n}","preventionTips":["Read handshake capabilities before calling methods","Pin client and agent versions together in deployment","Maintain a client-side allowlist of method names per agent version"],"tags":["rpc","protocol","go","hive"],"backgroundTag":"unknown-rpc-method","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"}