{"record":{"id":"cca60335979fce54","repo":"vectordotdev/vector","slug":"transform-output-misconfigured","errorCode":null,"errorMessage":"transform output misconfigured","messagePattern":"transform output misconfigured","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/topology/schema.rs","lineNumber":186,"sourceCode":"                .expect(\"already found inputs\")\n                .iter()\n                .find_map(|output| {\n                    if output.port == input.port {\n                        Some(\n                            input.with_definitions(\n                                output\n                                    .schema_definitions(config.schema_enabled())\n                                    .values()\n                                    .cloned(),\n                            ),\n                        )\n                    } else {\n                        None\n                    }\n                })\n                // If we find no match, it means the topology is misconfigured. This is a fatal\n                // error, but other parts of the topology builder deal with this state.\n                .expect(\"transform output misconfigured\");\n\n            if contains_never(&transform_definition) {\n                return Err(Error::ContainsNever);\n            }\n\n            // Append whatever number of additional pipelines we created to the existing\n            // pipeline definitions.\n            definitions.append(&mut transform_definition);\n        }\n    }\n\n    cache.insert(\n        (config.schema_enabled(), inputs.to_vec()),\n        definitions.clone(),\n    );\n\n    Ok(definitions)\n}","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/topology/schema.rs#L168-L204","documentation":"In `expanded_definitions` (src/topology/schema.rs:186), after matching a transform output to the requested port, `.expect(\"transform output misconfigured\")` fires when no output port matches. The comment notes this is a fatal misconfiguration that other parts of the topology builder normally catch earlier; reaching this expect means those earlier validations were bypassed.","triggerScenarios":"A sink (or consumer) references a transform's named output port that the transform does not define — e.g. `sink.inputs = [{\"my_transform\": \"remap\"}]` where `my_transform` only emits the default port — reached via validate_sink_expectations or test_expanded_definition without a prior topology build check.","commonSituations":"Typos in named output ports in the config; using `remap` outputs (`route`-style named outputs) on a transform that doesn't produce them; running `vector test`/`vector validate` against hand-edited configs.","solutions":["Check the sink/consumer input references an output port the transform actually defines; fix the port name or add the named output.","Run `vector validate` on the config before testing so the topology builder's own misconfiguration error surfaces instead of this panic.","If using multiple outputs, declare them (e.g. route/remap named outputs) so every referenced port exists."],"exampleFix":"// before (my_transform has no named output \"foo\")\nsinks:\n  my_sink:\n    inputs:\n      - my_transform.foo\n\n// after: use the default output or define the named output\nsinks:\n  my_sink:\n    inputs:\n      - my_transform","handlingStrategy":"validation","validationCode":"// verify every referenced named output port exists on the producing transform\nfor input in sink.inputs {\n    if let Some(port) = &input.port {\n        assert!(transform_defines_output(&config, &input.component, port), \"unknown output port {port}\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `vector validate` (or `vector test`) before deploying configs that use named output ports.","Double-check port names when a transform defines multiple outputs.","Only reference named outputs from transforms that explicitly declare them (e.g. remap/route)."],"tags":["rust","config","topology","schema"],"backgroundTag":"resource-not-found","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}