{"record":{"id":"10e962e410ede322","repo":"hashicorp/nomad","slug":"s-q-10e962","errorCode":null,"errorMessage":"%s: %q","messagePattern":"%s: %q","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/streaming_rpc.go","lineNumber":52,"sourceCode":"\n// NewStreamingRpcRegistry creates a new registry. All registrations of\n// handlers should be done before retrieving handlers.\nfunc NewStreamingRpcRegistry() *StreamingRpcRegistry {\n\treturn &StreamingRpcRegistry{\n\t\tregistry: make(map[string]StreamingRpcHandler),\n\t}\n}\n\n// Register registers a new handler for the given method name\nfunc (s *StreamingRpcRegistry) Register(method string, handler StreamingRpcHandler) {\n\ts.registry[method] = handler\n}\n\n// GetHandler returns a handler for the given method or an error if it doesn't exist.\nfunc (s *StreamingRpcRegistry) GetHandler(method string) (StreamingRpcHandler, error) {\n\th, ok := s.registry[method]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"%s: %q\", ErrUnknownMethod, method)\n\t}\n\n\treturn h, nil\n}\n\n// Bridge is used to just link two connections together and copy traffic\nfunc Bridge(a, b io.ReadWriteCloser) {\n\twg := sync.WaitGroup{}\n\twg.Add(2)\n\tgo func() {\n\t\tdefer wg.Done()\n\t\t_, _ = io.Copy(a, b)\n\t\ta.Close()\n\t\tb.Close()\n\t}()\n\tgo func() {\n\t\tdefer wg.Done()\n\t\t_, _ = io.Copy(b, a)","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/streaming_rpc.go#L34-L70","documentation":"StreamingRpcRegistry.GetHandler wraps the registry lookup miss: the requested streaming RPC method name is not registered. The generic guard fires when an agent receives a streaming connection for an unknown/outdated method.","triggerScenarios":"Thrown at nomad/structs/streaming_rpc.go:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the method name matches a registered streaming handler","Check for version mismatch between client and server agents"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}