langgenius/dify · error · InvalidArgumentError
invalid node_id, please use correspond api for conversation
Error message
invalid node_id, please use correspond api for conversation and system variables, node_id={node_id} What it means
Error "invalid node_id, please use correspond api for conversation and system variables, node_id={node_id}" thrown in langgenius/dify.
Source
Thrown at api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py:144
)
draft_var_srv.delete_user_workflow_variables(pipeline.id, user_id=current_user.id)
db.session.commit()
return Response("", 204)
def validate_node_id(node_id: str) -> NoReturn | None:
if node_id in [
CONVERSATION_VARIABLE_NODE_ID,
SYSTEM_VARIABLE_NODE_ID,
]:
# NOTE(QuantumGhost): While we store the system and conversation variables as node variables
# with specific `node_id` in database, we still want to make the API separated. By disallowing
# accessing system and conversation variables in `WorkflowDraftNodeVariableListApi`,
# we mitigate the risk that user of the API depending on the implementation detail of the API.
#
# ref: [Hyrum's Law](https://www.hyrumslaw.com/)
raise InvalidArgumentError(
f"invalid node_id, please use correspond api for conversation and system variables, node_id={node_id}",
)
return None
@console_ns.route("/rag/pipelines/<uuid:pipeline_id>/workflows/draft/nodes/<string:node_id>/variables")
class RagPipelineNodeVariableCollectionApi(Resource):
@console_ns.response(200, "Node variables retrieved successfully", workflow_draft_variable_list_model)
@_api_prerequisite
@marshal_with(workflow_draft_variable_list_model)
def get(self, current_user: Account, pipeline: Pipeline, node_id: str):
validate_node_id(node_id)
with sessionmaker(bind=db.engine, expire_on_commit=False).begin() as session:
draft_var_srv = WorkflowDraftVariableService(
session=session,
)
node_vars = draft_var_srv.list_node_variables(pipeline.id, node_id, user_id=current_user.id)
View on GitHub (pinned to ef8544b173)
When it happens
Trigger: Thrown at api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py:144 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/b45a68aa9e5c6d9e.
Report an issue: GitHub.