{"record":{"id":"875a5235656589e4","repo":"apache/superset","slug":"invalid-uuid-uuid","errorCode":null,"errorMessage":"Invalid UUID: {uuid}","messagePattern":"Invalid UUID: (.+?)","errorType":"validation","errorClass":"ValidationError","httpStatus":422,"severity":"error","filePath":"superset/commands/dataset/update.py","lineNumber":478,"sourceCode":"            fqn = tuple(path + [name])\n            if name and fqn in seen_fqns:\n                raise ValidationError(f\"Duplicate folder name: {name}\")\n            seen_fqns.add(fqn)\n\n            # Allow default folders (by UUID) to use reserved names\n            if (\n                name.lower() in {\"metrics\", \"columns\"}\n                and str(uuid) not in DEFAULT_FOLDER_UUIDS\n            ):\n                raise ValidationError(f\"Folder cannot have name '{name}'\")\n\n        # check if metric/column UUID exists (skip default folders)\n        elif (\n            not name\n            and uuid not in valid_uuids\n            and str(uuid) not in DEFAULT_FOLDER_UUIDS\n        ):\n            raise ValidationError(f\"Invalid UUID: {uuid}\")\n\n        # traverse children\n        if children := obj.get(\"children\"):\n            path.append(uuid)\n            queue.extend((folder, path) for folder in children)\n","sourceCodeStart":460,"sourceCodeEnd":484,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/dataset/update.py#L460-L484","documentation":"Raised by validate_folders() for an unnamed folder node whose uuid is neither a metric/column uuid present in valid_uuids nor one of DEFAULT_FOLDER_UUIDS. Unnamed nodes are pointers to real metrics/columns; if the uuid matches nothing on the dataset, the pointer is dangling and the structure is rejected.","triggerScenarios":"PUT /api/v1/dataset/{id} with a folder node without 'name' whose uuid references a metric or column that was deleted, belongs to another dataset, or is simply a typo'd uuid.","commonSituations":"Stale payloads: folder tree saved before a column/metric was removed, then resubmitted. Copying a folder structure between datasets — the leaf uuids don't exist on the target. Manual uuid edits.","solutions":["Re-fetch the dataset's current columns/metrics and rebuild the folder leaves from uuids that exist (see validationCode).","Remove the dangling node from the payload.","When copying structures across datasets, remap leaf uuids to the target dataset's own column/metric uuids."],"exampleFix":"# before\nfolders = [{\"uuid\": str(deleted_column_uuid)}]  # Invalid UUID: ...\n# after\nvalid = {str(c.uuid) for c in dataset.columns} | {str(m.uuid) for m in dataset.metrics}\nfolders = [{\"uuid\": u} for u in wanted_uuids if u in valid]","handlingStrategy":"validation","validationCode":"valid = {str(c.uuid) for c in dataset.columns} | {str(m.uuid) for m in dataset.metrics}\nvalid |= set(DEFAULT_FOLDER_UUIDS)\nfolders = [n for n in walk(folders) if n.get(\"name\") or str(n[\"uuid\"]) in valid]\nassert all(n.get(\"name\") or str(n[\"uuid\"]) in valid for n in walk(folders))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Rebuild leaf uuids from the dataset's live columns/metrics on every save.","Remap uuids when copying folder trees across datasets.","Purge folder entries for deleted metrics/columns before submitting."],"tags":["dataset","folders","validation","uuid","dangling-reference"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}