t8y2/dbx · error
unknown method: %s
Error message
unknown method: %s
What it means
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).
Source
Thrown at agents/drivers/cassandra-go/main.go:394
case "fetch_query_page", "fetch_table_read_page":
result, err := s.fetchQueryPage(stringParam(params, "sessionId"), intParam(params, "pageSize"))
return result, false, err
case "close_query_session", "close_table_read_session":
return s.closeQuerySession(stringParam(params, "sessionId")), false, nil
case "execute_transaction":
result, err := s.executeStatements(params, true)
return result, false, err
case "execute_batch":
result, err := s.executeStatements(params, false)
return result, false, err
case "disconnect":
s.disconnect()
return map[string]bool{"ok": true}, false, nil
case "shutdown":
s.disconnect()
return map[string]bool{"ok": true}, true, nil
default:
return nil, false, fmt.Errorf("unknown method: %s", method)
}
}
func handshakeResult(multiSession bool) map[string]any {
capabilities := []string{
"connect", "test_connection", "metadata", "query", "paged_query", "transaction", "ddl", "structured_error_v1",
}
if multiSession {
capabilities = append(capabilities, "multi_session")
}
return map[string]any{
"protocolVersion": protocolVersion,
"agentProtocolVersion": protocolVersion,
"capabilities": capabilities,
}
}
func (s *server) validateConnection() error {View on GitHub (pinned to c0390bff16)
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.
Example fix
// before
{"method": "Query"} // wrong case
// after
{"method": "query"} Defensive patterns
Strategy: validation
Validate before calling
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}
if !supported[method] {
return fmt.Errorf("method %q not supported by this agent build", method)
} Try / catch
if err != nil && strings.Contains(err.Error(), "unknown method:") {
return fmt.Errorf("check agent/client version compatibility: %w", err)
} Prevention
- 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.
When it happens
Trigger: 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.).
Common situations: 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.
Related errors
- unknown method: %s
- Unknown method: <method>
- agentSessionId is required
- agentSessionId is required
- agentSessionId is required
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/97e4283288324a5c.
Report an issue: GitHub.