{"record":{"id":"5f89c9cbda19b7c8","repo":"langflow-ai/langflow","slug":"name-must-be-unique","errorCode":null,"errorMessage":"Name must be unique","messagePattern":"Name must be unique","errorType":"http","errorClass":"HTTPException","httpStatus":409,"severity":"error","filePath":"src/backend/base/langflow/api/v1/flows_helpers.py","lineNumber":474,"sourceCode":"        ).first()\n        if not folder:\n            raise HTTPException(status_code=400, detail=\"Folder not found\")\n\n    # Check name uniqueness against the *owner's* flows (the unique constraint\n    # is (user_id, name); checking against the actor's namespace would miss\n    # collisions when actor != owner).\n    if flow.name and flow.name != existing_flow.name:\n        name_conflict = (\n            await session.exec(\n                select(Flow).where(\n                    Flow.name == flow.name,\n                    Flow.user_id == owner_user_id,\n                    Flow.id != existing_flow.id,\n                )\n            )\n        ).first()\n        if name_conflict:\n            raise HTTPException(status_code=409, detail=\"Name must be unique\")\n\n    # Check endpoint_name uniqueness — same owner-scope rationale.\n    if flow.endpoint_name and flow.endpoint_name != existing_flow.endpoint_name:\n        endpoint_conflict = (\n            await session.exec(\n                select(Flow).where(\n                    Flow.endpoint_name == flow.endpoint_name,\n                    Flow.user_id == owner_user_id,\n                    Flow.id != existing_flow.id,\n                )\n            )\n        ).first()\n        if endpoint_conflict:\n            raise HTTPException(status_code=409, detail=\"Endpoint name must be unique\")\n\n    # None-valued inputs are treated as omitted by default for updates.\n    update_data = flow.model_dump(exclude_unset=True, exclude_none=True)\n","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/flows_helpers.py#L456-L492","documentation":"Error \"Name must be unique\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when creating or renaming a flow to a name that already exists within the same folder/project scope.","commonSituations":"See trigger scenarios.","solutions":["Choose a different flow name; names must be unique within the folder."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}