{"record":{"id":"61c49ea9f9a79f15","repo":"langgenius/dify","slug":"variable-not-found-id-variable-id-str","errorCode":null,"errorMessage":"variable not found, id={variable_id_str}","messagePattern":"variable not found, id=(.+?)","errorType":"http","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py","lineNumber":190,"sourceCode":"        return Response(\"\", 204)\n\n\n@console_ns.route(\"/rag/pipelines/<uuid:pipeline_id>/workflows/draft/variables/<uuid:variable_id>\")\nclass RagPipelineVariableApi(Resource):\n    _PATCH_NAME_FIELD = \"name\"\n    _PATCH_VALUE_FIELD = \"value\"\n\n    @console_ns.response(200, \"Variable retrieved successfully\", workflow_draft_variable_model)\n    @_api_prerequisite\n    @marshal_with(workflow_draft_variable_model)\n    def get(self, _current_user: Account, pipeline: Pipeline, variable_id: UUID):\n        draft_var_srv = WorkflowDraftVariableService(\n            session=db.session(),\n        )\n        variable_id_str = str(variable_id)\n        variable = draft_var_srv.get_variable(variable_id=variable_id_str)\n        if variable is None:\n            raise NotFoundError(description=f\"variable not found, id={variable_id_str}\")\n        if variable.app_id != pipeline.id:\n            raise NotFoundError(description=f\"variable not found, id={variable_id_str}\")\n        return variable\n\n    @console_ns.response(200, \"Variable updated successfully\", workflow_draft_variable_model)\n    @_api_prerequisite\n    @marshal_with(workflow_draft_variable_model)\n    @console_ns.expect(console_ns.models[WorkflowDraftVariablePatchPayload.__name__])\n    @model_validate(WorkflowDraftVariablePatchPayload)\n    def patch(\n        self,\n        req_data: WorkflowDraftVariablePatchPayload,\n        _current_user: Account,\n        pipeline: Pipeline,\n        variable_id: UUID,\n    ):\n        # Request payload for file types:\n        #","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py#L172-L208","documentation":"Error \"variable not found, id={variable_id_str}\" thrown in langgenius/dify.","triggerScenarios":"Thrown at api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py:190 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-13T14:17:21.547Z"}