{"record":{"id":"456f746d26fef837","repo":"Significant-Gravitas/AutoGPT","slug":"graph-execution-graph-exec-id-not-found-456f74","errorCode":null,"errorMessage":"Graph execution #{graph_exec_id} not found","messagePattern":"Graph execution #(.+?) not found","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/library/db.py","lineNumber":2071,"sourceCode":"    create_request: library_model.LibraryAgentPresetCreatableFromGraphExecution,\n) -> library_model.LibraryAgentPreset:\n    \"\"\"\n    Creates a new AgentPreset from an AgentGraphExecution.\n\n    Params:\n        user_id: The ID of the user creating the preset.\n        create_request: The data used for creation.\n\n    Returns:\n        The newly created LibraryAgentPreset.\n\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.\"","sourceCodeStart":2053,"sourceCodeEnd":2089,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/library/db.py#L2053-L2089","documentation":"Error \"Graph execution #{graph_exec_id} not found\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2071 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the graph execution ID is correct and belongs to your account.","Check the execution history; the record may have been cleaned up."],"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"}