{"record":{"id":"97e4283288324a5c","repo":"t8y2/dbx","slug":"unknown-method-s-97e428","errorCode":null,"errorMessage":"unknown method: %s","messagePattern":"unknown method: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/main.go","lineNumber":394,"sourceCode":"\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.executeStatements(params, true)\n\t\treturn result, false, err\n\tcase \"execute_batch\":\n\t\tresult, err := s.executeStatements(params, false)\n\t\treturn result, false, err\n\tcase \"disconnect\":\n\t\ts.disconnect()\n\t\treturn map[string]bool{\"ok\": true}, false, nil\n\tcase \"shutdown\":\n\t\ts.disconnect()\n\t\treturn map[string]bool{\"ok\": true}, true, nil\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 (s *server) validateConnection() error {","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/main.go#L376-L412","documentation":"dispatch routes incoming RPC method names to handlers; the default branch rejects any method name not in its switch. This is a protocol-level guard: the client invoked a method this agent build does not implement (or the name is misspelled).","triggerScenarios":"Sending a JSON-RPC style request whose method string does not match one of the handled cases (connect, test_connection, metadata, query, paged_query, transaction, ddl, disconnect, shutdown, etc.).","commonSituations":"Client SDK version newer than the agent (method added client-side but not implemented in this driver build); typo in hand-rolled RPC calls; whitespace/case differences in the method string.","solutions":["Use one of the supported method names exactly as declared in the handshake capabilities list.","Upgrade the agent driver to a build that implements the method your client sends.","Log the raw method string received to catch typos or case/whitespace mismatches."],"exampleFix":"// before\n{\"method\": \"Query\"}  // wrong case\n// after\n{\"method\": \"query\"}","handlingStrategy":"validation","validationCode":"var supported = map[string]bool{\"connect\":true,\"test_connection\":true,\"metadata\":true,\"query\":true,\"paged_query\":true,\"transaction\":true,\"ddl\":true,\"disconnect\":true,\"shutdown\":true}\nif !supported[method] {\n    return fmt.Errorf(\"method %q not supported by this agent build\", method)\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"unknown method:\") {\n    return fmt.Errorf(\"check agent/client version compatibility: %w\", err)\n}","preventionTips":["Keep client and agent versions in lockstep.","Validate method names against the handshake capabilities list before calling.","Pin the method strings in a shared constant set instead of literals."],"tags":["protocol","rpc","dispatch"],"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"}