{"record":{"id":"398f691d2353aa49","repo":"Significant-Gravitas/AutoGPT","slug":"agentgraph-resource-id-not-found","errorCode":null,"errorMessage":"AgentGraph '{resource_id}' not found","messagePattern":"AgentGraph '(.+?)' not found","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/transfers/db.py","lineNumber":212,"sourceCode":"\n    return TransferResponse.from_db(updated)\n\n\n# ---------------------------------------------------------------------------\n# Internal helpers\n# ---------------------------------------------------------------------------\n\n\nasync def _validate_resource_ownership(\n    resource_type: str, resource_id: str, org_id: str\n) -> None:\n    \"\"\"Verify the resource exists and belongs to the given org.\"\"\"\n    if resource_type == \"AgentGraph\":\n        graph = await prisma.agentgraph.find_first(\n            where={\"id\": resource_id, \"isActive\": True}\n        )\n        if graph is None:\n            raise NotFoundError(f\"AgentGraph '{resource_id}' not found\")\n        if graph.organizationId != org_id:\n            raise ValueError(\"AgentGraph does not belong to the source organization\")\n\n    elif resource_type == \"StoreListing\":\n        listing = await prisma.storelisting.find_unique(where={\"id\": resource_id})\n        if listing is None or listing.isDeleted:\n            raise NotFoundError(f\"StoreListing '{resource_id}' not found\")\n        if listing.owningOrgId != org_id:\n            raise ValueError(\"StoreListing does not belong to the source organization\")\n\n\nasync def _move_resource(\n    resource_type: str,\n    resource_id: str,\n    target_org_id: str,\n) -> None:\n    \"\"\"Move the resource to the target organization.\"\"\"\n    if resource_type == \"AgentGraph\":","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/transfers/db.py#L194-L230","documentation":"Error \"AgentGraph '{resource_id}' not found\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the agent graph ID exists and is correct.","Check that the graph has not been deleted."],"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"}