{"record":{"id":"813ac2a9cb1c07df","repo":"deepset-ai/haystack","slug":"sender-component-name-does-not-have-any-outpu","errorCode":null,"errorMessage":"'${sender_component_name}' does not have any output connections. Please check that the output types of '${sender_component_name}.run' are set, for example by using the '@component.output_types' decorator.","messagePattern":"'(.+?)' does not have any output connections\\. Please check that the output types of '(.+?)\\.run' are set, for example by using the '@component\\.output_types' decorator\\.","errorType":"exception","errorClass":"PipelineConnectError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":633,"sourceCode":"        # Edges may be named explicitly by passing 'node_name.edge_name' to connect().\n        sender_component_name, sender_socket_name = parse_connect_string(sender)\n        receiver_component_name, receiver_socket_name = parse_connect_string(receiver)\n\n        if sender_component_name == receiver_component_name:\n            raise PipelineConnectError(\"Connecting a Component to itself is not supported.\")\n\n        # Get the nodes data.\n        try:\n            sender_sockets = self.graph.nodes[sender_component_name][\"output_sockets\"]\n        except KeyError as exc:\n            raise ValueError(f\"Component named {sender_component_name} not found in the pipeline.\") from exc\n        try:\n            receiver_sockets = self.graph.nodes[receiver_component_name][\"input_sockets\"]\n        except KeyError as exc:\n            raise ValueError(f\"Component named {receiver_component_name} not found in the pipeline.\") from exc\n\n        if not sender_sockets:\n            raise PipelineConnectError(\n                f\"'{sender_component_name}' does not have any output connections. \"\n                f\"Please check that the output types of '{sender_component_name}.run' are set, \"\n                f\"for example by using the '@component.output_types' decorator.\"\n            )\n\n        # If the name of either socket is given, get the socket\n        sender_socket: OutputSocket | None = None\n        if sender_socket_name:\n            sender_socket = sender_sockets.get(sender_socket_name)\n            if not sender_socket:\n                raise PipelineConnectError(\n                    f\"'{sender}' does not exist. \"\n                    f\"Output connections of {sender_component_name} are: \"\n                    + \", \".join([f\"{name} (type {_type_name(socket.type)})\" for name, socket in sender_sockets.items()])\n                )\n\n        receiver_socket: InputSocket | None = None\n        if receiver_socket_name:","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L615-L651","documentation":"Pipeline.connect() raises PipelineConnectError when the sender component exists but declares no output sockets, i.e. its run() method has no @component.output_types decorator (or it declares none). The pipeline cannot know what the component produces, so no connection can be established.","triggerScenarios":"Calling pipeline.connect('sender', 'receiver') where the sender's run() method lacks the @component.output_types decorator, or a custom component class defines run() without decorated output types.","commonSituations":"Writing a custom Component and forgetting @component.output_types on run(); a subclass overriding run() and dropping the decorator; wrapping a legacy component that never set output types.","solutions":["Add @component.output_types(...) to the sender's run() method declaring its return types","Ensure run() returns a dict whose keys match the declared output socket names","If wrapping the component, decorate the actual run method being called","Check that the decorated run() is the one registered (not overridden in a subclass without the decorator)"],"exampleFix":"// before\nclass MyComponent:\n    def run(self, text: str):\n        return {'out': text}\n// after\nclass MyComponent:\n    @component.output_types(out=str)\n    def run(self, text: str):\n        return {'out': text}","handlingStrategy":"validation","validationCode":"comp = pipeline.get_component('sender')\nassert getattr(comp, '__haystack_output__', None) and comp.__haystack_output__._sockets_dict, f\"'sender' has no output sockets; decorate run() with @component.output_types\"","typeGuard":"def has_output_sockets(component) -> bool:\n    return bool(getattr(getattr(component, '__haystack_output__', None), '_sockets_dict', {}))","tryCatchPattern":"try:\n    pipeline.connect(sender, receiver)\nexcept PipelineConnectError as e:\n    if 'does not have any output connections' in str(e):\n        raise TypeError(f'{sender}.run must be decorated with @component.output_types') from e","preventionTips":["Always decorate custom components' run() with @component.output_types","Write a unit test that connects every custom component in a minimal pipeline","Check subclasses do not override run() without re-decorating"],"tags":["pipeline","haystack","output-types","decorator"],"backgroundTag":"missing-output-types-decorator","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}