{"record":{"id":"7226c9346d53d74f","repo":"deepset-ai/haystack","slug":"unknown-join-mode-string-supported-modes-in-a","errorCode":null,"errorMessage":"Unknown join mode '{string}'. Supported modes in AnswerJoiner are: {list(enum_map.keys())}","messagePattern":"Unknown join mode '(.+?)'\\. Supported modes in AnswerJoiner are: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"haystack/components/joiners/answer_joiner.py","lineNumber":37,"sourceCode":"    \"\"\"\n    Enum for AnswerJoiner join modes.\n    \"\"\"\n\n    CONCATENATE = \"concatenate\"\n\n    def __str__(self) -> str:\n        return self.value\n\n    @staticmethod\n    def from_str(string: str) -> \"JoinMode\":\n        \"\"\"\n        Convert a string to a JoinMode enum.\n        \"\"\"\n        enum_map = {e.value: e for e in JoinMode}\n        mode = enum_map.get(string)\n        if mode is None:\n            msg = f\"Unknown join mode '{string}'. Supported modes in AnswerJoiner are: {list(enum_map.keys())}\"\n            raise ValueError(msg)\n        return mode\n\n\n@component\nclass AnswerJoiner:\n    \"\"\"\n    Merges multiple lists of `Answer` objects into a single list.\n\n    Use this component to combine answers from different Generators into a single list.\n    Currently, the component supports only one join mode: `CONCATENATE`.\n    This mode concatenates multiple lists of answers into a single list.\n\n    ### Usage example\n\n    In this example, AnswerJoiner merges answers from two different Generators:\n\n    ```python\n    from haystack.components.builders import AnswerBuilder","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/components/joiners/answer_joiner.py#L19-L55","documentation":"AnswerJoiner.JoinMode.from_str converts a string into a JoinMode enum; unknown strings raise ValueError listing the supported modes. AnswerJoiner currently only supports concatenation.","triggerScenarios":"Initializing AnswerJoiner(join_mode=\"merge\"), join_mode=\"sum\", or any string other than the JoinMode enum values (e.g. \"concatenate\").","commonSituations":"Copying join_mode settings from other joiners (e.g. DocumentJoiner supports more modes like 'reciprocal_rank_fusion', 'merge'); typo in YAML pipeline config.","solutions":["Use join_mode=\"concatenate\" (the only supported mode)","Omit join_mode to use the default","Inspect available modes via [e.value for e in JoinMode] before configuring"],"exampleFix":"// before\njoiner = AnswerJoiner(join_mode=\"reciprocal_rank_fusion\")\n// after\njoiner = AnswerJoiner(join_mode=\"concatenate\")","handlingStrategy":"validation","validationCode":"from haystack.components.joiners.answer_joiner import AnswerJoiner\nmode = \"merge\"\nassert mode in [e.value for e in AnswerJoiner.JoinMode], f\"unsupported join_mode: {mode}\"","typeGuard":null,"tryCatchPattern":"try:\n    joiner = AnswerJoiner(join_mode=cfg[\"join_mode\"])\nexcept ValueError as e:\n    if \"Unknown join mode\" in str(e):\n        joiner = AnswerJoiner(join_mode=\"concatenate\")  # default","preventionTips":["Use \"concatenate\" — the only supported mode","Don't copy join_mode from DocumentJoiner configs","Validate pipeline YAML join_mode values against the enum"],"tags":["python","haystack","joiner","config","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}