{"record":{"id":"b45a68aa9e5c6d9e","repo":"langgenius/dify","slug":"invalid-node-id-please-use-correspond-api-for-con","errorCode":null,"errorMessage":"invalid node_id, please use correspond api for conversation and system variables, node_id={node_id}","messagePattern":"invalid node_id, please use correspond api for conversation and system variables, node_id=(.+?)","errorType":"validation","errorClass":"InvalidArgumentError","httpStatus":400,"severity":"error","filePath":"api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py","lineNumber":144,"sourceCode":"        )\n        draft_var_srv.delete_user_workflow_variables(pipeline.id, user_id=current_user.id)\n        db.session.commit()\n        return Response(\"\", 204)\n\n\ndef validate_node_id(node_id: str) -> NoReturn | None:\n    if node_id in [\n        CONVERSATION_VARIABLE_NODE_ID,\n        SYSTEM_VARIABLE_NODE_ID,\n    ]:\n        # NOTE(QuantumGhost): While we store the system and conversation variables as node variables\n        # with specific `node_id` in database, we still want to make the API separated. By disallowing\n        # accessing system and conversation variables in `WorkflowDraftNodeVariableListApi`,\n        # we mitigate the risk that user of the API depending on the implementation detail of the API.\n        #\n        # ref: [Hyrum's Law](https://www.hyrumslaw.com/)\n\n        raise InvalidArgumentError(\n            f\"invalid node_id, please use correspond api for conversation and system variables, node_id={node_id}\",\n        )\n    return None\n\n\n@console_ns.route(\"/rag/pipelines/<uuid:pipeline_id>/workflows/draft/nodes/<string:node_id>/variables\")\nclass RagPipelineNodeVariableCollectionApi(Resource):\n    @console_ns.response(200, \"Node variables retrieved successfully\", workflow_draft_variable_list_model)\n    @_api_prerequisite\n    @marshal_with(workflow_draft_variable_list_model)\n    def get(self, current_user: Account, pipeline: Pipeline, node_id: str):\n        validate_node_id(node_id)\n        with sessionmaker(bind=db.engine, expire_on_commit=False).begin() as session:\n            draft_var_srv = WorkflowDraftVariableService(\n                session=session,\n            )\n            node_vars = draft_var_srv.list_node_variables(pipeline.id, node_id, user_id=current_user.id)\n","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py#L126-L162","documentation":"Error \"invalid node_id, please use correspond api for conversation and system variables, node_id={node_id}\" thrown in langgenius/dify.","triggerScenarios":"Thrown at api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py:144 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}