{"record":{"id":"b05ccae0eeaf631b","repo":"deepset-ai/haystack","slug":"missing-receiver-in-connection-connection","errorCode":null,"errorMessage":"Missing receiver in connection: {connection}","messagePattern":"Missing receiver in connection: (.+?)","errorType":"exception","errorClass":"PipelineError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":289,"sourceCode":"                        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:\n        \"\"\"\n        Writes the string representation of this pipeline to the file-like object passed in the `fp` argument.","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L271-L307","documentation":"The mirror of the sender check: each serialized connection must specify a 'receiver'. from_dict raises PipelineError when the 'receiver' key is absent, because connect() requires both endpoints to wire the pipeline.","triggerScenarios":"from_dict on pipeline data whose 'connections' list contains an entry like {\"sender\": \"retriever.documents\"} with no 'receiver' key.","commonSituations":"Hand-edited YAML dropping the receiver line; generators emitting partial connections; merge conflicts resolved incorrectly in pipeline config files.","solutions":["Add the 'receiver' key as \"componentName.inputSocket\" to the connection entry","Re-dump the pipeline with pipe.dumps() to get a canonical connections list","Cross-check both sender and receiver exist in the 'components' section"],"exampleFix":"// before\nconnections:\n  - sender: retriever.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 'receiver': {c}\" for c in data.get(\"connections\", []) if \"receiver\" not in c]","typeGuard":"def has_receiver(conn: dict) -> bool:\n    return isinstance(conn, dict) and \"receiver\" in conn","tryCatchPattern":"try:\n    pipe = Pipeline.from_dict(data)\nexcept PipelineError as e:\n    if \"Missing receiver\" in str(e):\n        logging.error(\"Fix the connections list: %s\", e)","preventionTips":["Always include both sender and receiver in every connection entry","Regenerate connections from a working pipeline via dumps()","Check merge diffs on pipeline YAML for dropped lines"],"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"}