{"record":{"id":"cc74a8f52902f27f","repo":"deepset-ai/haystack","slug":"missing-sender-in-connection-connection","errorCode":null,"errorMessage":"Missing sender in connection: {connection}","messagePattern":"Missing sender in connection: (.+?)","errorType":"exception","errorClass":"PipelineError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":287,"sourceCode":"                        data_str = json.dumps(component_data, default=str, indent=2)\n                    except Exception:\n                        data_str = str(component_data)\n\n                    max_len = 1000\n                    if len(data_str) > max_len:\n                        data_str = data_str[:max_len] + \"\\n... (truncated)\"\n\n                    msg = (\n                        f\"Couldn't deserialize component '{name}' of class '{component_class.__name__}' \"\n                        f\"with the following data:\\n{data_str}\\n\\n\"\n                        f\"Original error: {e}\"\n                    )\n                    raise DeserializationError(msg) from e\n            pipe.add_component(name=name, instance=instance)\n\n        for connection in data.get(\"connections\", []):\n            if \"sender\" not in connection:\n                raise PipelineError(f\"Missing sender in connection: {connection}\")\n            if \"receiver\" not in connection:\n                raise PipelineError(f\"Missing receiver in connection: {connection}\")\n            pipe.connect(sender=connection[\"sender\"], receiver=connection[\"receiver\"])\n\n        return pipe\n\n    def dumps(self, marshaller: Marshaller = DEFAULT_MARSHALLER) -> str:\n        \"\"\"\n        Returns the string representation of this pipeline according to the format dictated by the `Marshaller` in use.\n\n        :param marshaller:\n            The Marshaller used to create the string representation. Defaults to `YamlMarshaller`.\n        :returns:\n            A string representing the pipeline.\n        \"\"\"\n        return marshaller.marshal(self.to_dict())\n\n    def dump(self, fp: TextIO, marshaller: Marshaller = DEFAULT_MARSHALLER) -> None:","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L269-L305","documentation":"While deserializing pipeline connections, each connection entry must name its 'sender'. from_dict validates this before calling connect and raises PipelineError if the key is missing, since a connection without a sender is unresolvable.","triggerScenarios":"from_dict on pipeline data whose 'connections' list contains an entry without a 'sender' key, e.g. {\"receiver\": \"ranker.documents\"}.","commonSituations":"Hand-writing connections in YAML instead of dumping them; template-generated configs with unfilled sender fields; copy-paste deletions; truncated files.","solutions":["Add the 'sender' key as \"componentName.outputSocket\" to the connection entry","Regenerate the connections section with pipe.dumps() from a working pipeline","Validate the sender names against components actually defined in the file"],"exampleFix":"// before\nconnections:\n  - receiver: ranker.documents\n\n// after\nconnections:\n  - sender: retriever.documents\n    receiver: ranker.documents","handlingStrategy":"validation","validationCode":"def validate_connections(data: dict) -> list[str]:\n    return [f\"connection missing 'sender': {c}\" for c in data.get(\"connections\", []) if \"sender\" not in c]","typeGuard":"def has_sender(conn: dict) -> bool:\n    return isinstance(conn, dict) and \"sender\" in conn","tryCatchPattern":"try:\n    pipe = Pipeline.from_dict(data)\nexcept PipelineError as e:\n    if \"Missing sender\" in str(e):\n        logging.error(\"Fix the connections list: %s\", e)","preventionTips":["Dump connections with pipe.dumps() instead of writing them by hand","Validate \"component.socket\" naming for both endpoints","Add schema validation of pipeline YAML to CI"],"tags":["serialization","connections","pipeline","yaml","haystack"],"backgroundTag":"missing-required-field","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}