{"record":{"id":"86912de510627e3c","repo":"Significant-Gravitas/AutoGPT","slug":"storelisting-resource-id-not-found","errorCode":null,"errorMessage":"StoreListing '{resource_id}' not found","messagePattern":"StoreListing '(.+?)' not found","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/transfers/db.py","lineNumber":219,"sourceCode":"\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\":\n        # Move ALL versions, not just the active one, and land the graph at\n        # org-home (teamId=None) — a stale source-org teamId would fail every\n        # clause of the target org's visibility_filter, making the graph\n        # invisible to all target-org members.\n        await prisma.agentgraph.update_many(\n            where={\"id\": resource_id},\n            data={\"organizationId\": target_org_id, \"teamId\": None},","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/transfers/db.py#L201-L237","documentation":"Error \"StoreListing '{resource_id}' not found\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the store listing ID exists and is correct.","Check that the listing has not been removed."],"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"}