{"record":{"id":"f1c89c0411353d11","repo":"apache/beam","slug":"failed-to-add-input-kind-v","errorCode":null,"errorMessage":"failed to add input kind: %v","messagePattern":"failed to add input kind: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/graphx/translate.go","lineNumber":367,"sourceCode":"\nfunc getSideWindowMappingUrn(winFn *window.Fn) string {\n\tvar mappingUrn string\n\tswitch winFn.Kind {\n\tcase window.GlobalWindows:\n\t\tmappingUrn = URNWindowMappingGlobal\n\tcase window.FixedWindows:\n\t\tmappingUrn = URNWindowMappingFixed\n\tcase window.SlidingWindows:\n\t\tmappingUrn = URNWindowMappingSliding\n\tcase window.Sessions:\n\t\tpanic(\"session windowing is not supported for side inputs\")\n\t}\n\treturn mappingUrn\n}\n\nfunc (m *marshaller) addMultiEdge(edge NamedEdge) ([]string, error) {\n\thandleErr := func(err error) ([]string, error) {\n\t\treturn nil, errors.Wrapf(err, \"failed to add input kind: %v\", edge)\n\t}\n\tid := edgeID(edge.Edge)\n\tif _, exists := m.transforms[id]; exists {\n\t\treturn []string{id}, nil\n\t}\n\n\tswitch {\n\tcase edge.Edge.Op == graph.CoGBK && len(edge.Edge.Input) > 1:\n\t\tcogbkID, err := m.expandCoGBK(edge)\n\t\tif err != nil {\n\t\t\treturn handleErr(err)\n\t\t}\n\t\treturn []string{cogbkID}, nil\n\tcase edge.Edge.Op == graph.Reshuffle:\n\t\treshuffleID, err := m.expandReshuffle(edge)\n\t\tif err != nil {\n\t\t\treturn handleErr(err)\n\t\t}","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/graphx/translate.go#L349-L385","documentation":"Generic wrap used inside addMultiEdge's handleErr helper: any failure while adding an input kind (encoding a multi-edge's data, coders, windows, state specs, etc.) is re-wrapped with the edge's name. The inner error carries the real cause; this message identifies which edge of the graph failed.","triggerScenarios":"Any failure inside addMultiEdge while marshalling — e.g. coder registration failures, windowing strategy errors, external payload mismatches — all funneled through handleErr with the NamedEdge in the message.","commonSituations":"Debugging large pipeline graphs where the marshal error chain names the specific edge/transform that failed to convert.","solutions":["Print the full wrapped error chain to find the root cause","Locate the edge named in the message in your pipeline and inspect its inputs/coders","Reproduce with a minimal pipeline containing only that transform","Check SDK version known issues for graphx marshalling"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if _, err := graphx.Marshal(p); err != nil {\n    var e *errors.Error\n    if stderrors.As(err, &e) && strings.Contains(err.Error(), \"failed to add input kind\") {\n        log.Printf(\"edge failure, root cause: %v\", errors.Unwrap(err))\n    }\n    return err\n}","preventionTips":["Always log the unwrapped root cause; this message only names the edge","Build pipelines with public beam.* combinators rather than raw graph types"],"tags":["go","apache-beam","marshalling","edge"],"backgroundTag":"pipeline-serialization-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}