{"record":{"id":"6b5b35d4770acfde","repo":"Significant-Gravitas/AutoGPT","slug":"graph-preset-graph-id-v-preset-graph-version-n","errorCode":null,"errorMessage":"Graph #{preset.graph_id} v{preset.graph_version} not found or not accessible","messagePattern":"Graph #(.+?) v(.+?) not found or not accessible","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/library/db.py","lineNumber":2007,"sourceCode":"\n    Returns:\n        The newly created LibraryAgentPreset.\n\n    Raises:\n        DatabaseError: If there's a database error in creating the preset.\n    \"\"\"\n    logger.debug(\n        f\"Creating preset ({repr(preset.name)}) for user #{user_id}\",\n    )\n    # A preset may only reference a graph the caller can access (own / store /\n    # library); get_graph() enforces that and a foreign/unknown graph is None.\n    # The preset then inherits the graph's org/team (resource-follows-parent),\n    # resolved here so callers can't forget it.\n    graph = await graph_db.get_graph(\n        preset.graph_id, preset.graph_version, user_id=user_id\n    )\n    if not graph:\n        raise NotFoundError(\n            f\"Graph #{preset.graph_id} v{preset.graph_version} \"\n            \"not found or not accessible\"\n        )\n\n    # Refuse to attach a webhook the caller doesn't own\n    if webhook_id:\n        webhook = await integrations_db.get_webhook(webhook_id)\n        if webhook.user_id != user_id:\n            raise NotFoundError(f\"Webhook #{webhook_id} not found\")\n\n    create_input = prisma.types.AgentPresetCreateInput(\n        userId=user_id,\n        name=preset.name,\n        description=preset.description,\n        agentGraphId=preset.graph_id,\n        agentGraphVersion=preset.graph_version,\n        isActive=preset.is_active,\n        webhookId=webhook_id,","sourceCodeStart":1989,"sourceCodeEnd":2025,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/library/db.py#L1989-L2025","documentation":"Error \"Graph #{preset.graph_id} v{preset.graph_version} not found or not accessible\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2007 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the graph ID and version referenced by the preset still exist and are accessible.","Recreate the preset from a current graph version."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}