{"record":{"id":"59cc00f95cc14450","repo":"t8y2/dbx","slug":"unknown-method-s-59cc00","errorCode":null,"errorMessage":"unknown method: %s","messagePattern":"unknown method: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/kingbase-go/main.go","lineNumber":461,"sourceCode":"\t\tresult, err := s.executeQueryPage(opts, intParam(params, \"pageSize\"))\n\t\treturn result, false, err\n\tcase \"fetch_query_page\", \"fetch_table_read_page\":\n\t\tresult, err := s.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 s.closeQuerySession(stringParam(params, \"sessionId\")), false, nil\n\tcase \"execute_transaction\":\n\t\tresult, err := s.executeTransaction(params)\n\t\treturn result, false, err\n\tcase \"execute_batch\":\n\t\tresult, err := s.executeBatch(params)\n\t\treturn result, false, err\n\tcase \"disconnect\":\n\t\treturn map[string]bool{\"ok\": true}, false, s.disconnect()\n\tcase \"shutdown\":\n\t\treturn map[string]bool{\"ok\": true}, true, s.disconnect()\n\tdefault:\n\t\treturn nil, false, fmt.Errorf(\"unknown method: %s\", method)\n\t}\n}\n\nfunc (s *server) connect(cp connectParams) error {\n\t_ = s.disconnect()\n\tdb, err := openAndPingDB(cp, defaultConnectTimeout, s.openDatabase)\n\tif err != nil {\n\t\treturn err\n\t}\n\ts.db = db\n\ts.params = cp\n\ts.mode = detectKingbaseMode(db, cp.MySQLCompatMode)\n\ts.mode.legacyV7 = detectKingbaseV7(db)\n\ts.usePgDefaultExpression = false\n\ts.usePgViewDefinition = false\n\ts.usePgFunctionDefinition = false\n\ts.useLegacyRoutineDefinition = false\n\ts.catalogIdentityUnsupported = false","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/kingbase-go/main.go#L443-L479","documentation":"The server's JSON-RPC method dispatcher has no case for the requested method, so it returns 'unknown method: %s'. This is the driver's protocol-level guard against typos and unsupported operations for the connected agent protocol version.","triggerScenarios":"Sending a method name in the RPC request that is not one of the supported cases (e.g. 'query', 'connect', 'disconnect', 'shutdown', and peers) — misspelled method, wrong casing, or a method added in a newer agent protocol than the driver supports.","commonSituations":"Client built against a newer driver version calling methods an older runtime doesn't implement; typo in the method string in the request payload; copy-pasted method names from a different driver's protocol.","solutions":["Check the exact method name against the driver's dispatcher (case-sensitive)","Align client and driver/runtime versions so both support the method","List supported methods from the driver source or its README before invoking","Add a handler case in the dispatcher if the method is genuinely missing"],"exampleFix":"// before\n{\"method\": \"ExecuteQuery\", ...} // wrong casing\n// after\n{\"method\": \"query\", ...}","handlingStrategy":"validation","validationCode":"// Go: whitelist methods before dispatch\nvar supported = map[string]bool{\"connect\": true, \"query\": true, \"disconnect\": true, \"shutdown\": true}\nif !supported[method] {\n    return fmt.Errorf(\"method %q not supported by this driver\", method)\n}","typeGuard":null,"tryCatchPattern":"res, err := s.callMethod(method, params)\nif err != nil && strings.Contains(err.Error(), \"unknown method\") {\n    return nil, fmt.Errorf(\"check driver version supports %q: %w\", method, err)\n}","preventionTips":["Keep client method list in sync with driver version","Centralize method-name constants instead of raw strings","Pin and version-check the agent protocol between client and runtime"],"tags":["kingbase","agent-runtime","rpc","protocol","go"],"backgroundTag":"unknown-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"}