{"record":{"id":"94f663c15122f388","repo":"t8y2/dbx","slug":"unknown-method-s","errorCode":null,"errorMessage":"unknown method: %s","messagePattern":"unknown method: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/argo-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/argo-go/main.go#L455-L491","documentation":"The JSON-RPC style dispatcher in the argo-go agent does not recognize the requested method name. dispatch switches on a fixed set of method names (connect, metadata, query, execute_query, disconnect, shutdown, etc.) and returns this error in its default branch. It means the client sent a method this agent build does not implement or advertise in its handshake capabilities.","triggerScenarios":"Sending any method name not in the switch statement (e.g. a typo like 'excute_query', a camelCase variant like 'executeQuery', or a newer method like 'list_indexes' on an older agent binary) over stdio to the agent after handshake.","commonSituations":"Client and agent version mismatch where the UI calls a capability the deployed agent predates; typos or casing differences in method names; calling a method the handshake capabilities list does not advertise.","solutions":["Check the method name spelling and casing against the switch cases in main.go dispatch (connect, test_connection, metadata, query, paged_query, transaction, ddl, execute_query, etc.).","Compare the client's call with the agent's handshake capabilities array; only call advertised capabilities.","Upgrade the agent binary if the method is from a newer protocol version than the deployed agent.","Check the agent's protocolVersion/agentProtocolVersion in the handshake response and align the client to that protocol version."],"exampleFix":"// before\n{\"method\":\"executeQuery\",\"params\":{...}}\n// after\n{\"method\":\"execute_query\",\"params\":{...}}","handlingStrategy":"validation","validationCode":"// Validate the method against the agent's advertised handshake capabilities before dispatching.\nfunc isAdvertised(method string, capabilities []string) bool {\n    for _, c := range capabilities {\n        if c == method {\n            return true\n        }\n    }\n    return false\n}\nif !isAdvertised(\"execute_query\", handshake.Capabilities) {\n    return fmt.Errorf(\"method %q not advertised by agent (protocolVersion %s)\", \"execute_query\", handshake.ProtocolVersion)\n}","typeGuard":null,"tryCatchPattern":"result, err := dispatch(server, method, params)\nif err != nil {\n    if strings.HasPrefix(err.Error(), \"unknown method: \") {\n        // log the offending method + agent protocol version, degrade gracefully\n        log.Printf(\"unsupported method %q on agent protocol %s\", method, protocolVersion)\n        return fallbackResponse(method)\n    }\n    return err\n}","preventionTips":["Only call methods listed in the handshake 'capabilities' array.","Match method names exactly against the dispatch switch (snake_case, e.g. execute_query not executeQuery).","Pin client and agent versions together so protocol versions stay aligned.","On handshake, store protocolVersion and gate newer methods behind a version check."],"tags":["rpc","unknown-method","protocol","go"],"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-14T00:17:10.932Z"}