{"record":{"id":"2546808ec9f8bd1f","repo":"Significant-Gravitas/AutoGPT","slug":"graph-graph-execution-graph-id-not-found-or-acc","errorCode":null,"errorMessage":"Graph #{graph_execution.graph_id} not found or accessible","messagePattern":"Graph #(.+?) not found or accessible","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/library/db.py","lineNumber":2082,"sourceCode":"\n    Raises:\n        DatabaseError: If there's a database error in creating the preset.\n    \"\"\"\n    graph_exec_id = create_request.graph_execution_id\n    graph_execution = await get_graph_execution(user_id, graph_exec_id)\n    if not graph_execution:\n        raise NotFoundError(f\"Graph execution #{graph_exec_id} not found\")\n\n    # Sanity check: credential inputs must be available if required for this preset\n    if graph_execution.credential_inputs is None:\n        graph = await graph_db.get_graph(\n            graph_id=graph_execution.graph_id,\n            version=graph_execution.graph_version,\n            user_id=graph_execution.user_id,\n            include_subgraphs=True,\n        )\n        if not graph:\n            raise NotFoundError(\n                f\"Graph #{graph_execution.graph_id} not found or accessible\"\n            )\n        elif len(graph.regular_credentials_inputs) > 0:\n            raise ValueError(\n                f\"Graph execution #{graph_exec_id} can't be turned into a preset \"\n                \"because it was run before this feature existed \"\n                \"and so the input credentials were not saved.\"\n            )\n\n    logger.debug(\n        f\"Creating preset for user #{user_id} from graph execution #{graph_exec_id}\",\n    )\n    return await create_preset(\n        user_id=user_id,\n        preset=library_model.LibraryAgentPresetCreatable(\n            inputs=graph_execution.inputs,\n            credentials=graph_execution.credential_inputs or {},\n            graph_id=graph_execution.graph_id,","sourceCodeStart":2064,"sourceCodeEnd":2100,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/library/db.py#L2064-L2100","documentation":"Error \"Graph #{graph_execution.graph_id} not found or accessible\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2082 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the graph referenced by the execution still exists and is accessible.","Restore access to the graph or use a different execution."],"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-15T17:31:12.345Z"}