Significant-Gravitas/AutoGPT · error · ValueError

StoreListing does not belong to the source organization

Error message

StoreListing does not belong to the source organization

What it means

Error "StoreListing does not belong to the source organization" thrown in Significant-Gravitas/AutoGPT.

Source

Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:221

async def _validate_resource_ownership(
    resource_type: str, resource_id: str, org_id: str
) -> None:
    """Verify the resource exists and belongs to the given org."""
    if resource_type == "AgentGraph":
        graph = await prisma.agentgraph.find_first(
            where={"id": resource_id, "isActive": True}
        )
        if graph is None:
            raise NotFoundError(f"AgentGraph '{resource_id}' not found")
        if graph.organizationId != org_id:
            raise ValueError("AgentGraph does not belong to the source organization")

    elif resource_type == "StoreListing":
        listing = await prisma.storelisting.find_unique(where={"id": resource_id})
        if listing is None or listing.isDeleted:
            raise NotFoundError(f"StoreListing '{resource_id}' not found")
        if listing.owningOrgId != org_id:
            raise ValueError("StoreListing does not belong to the source organization")


async def _move_resource(
    resource_type: str,
    resource_id: str,
    target_org_id: str,
) -> None:
    """Move the resource to the target organization."""
    if resource_type == "AgentGraph":
        # Move ALL versions, not just the active one, and land the graph at
        # org-home (teamId=None) — a stale source-org teamId would fail every
        # clause of the target org's visibility_filter, making the graph
        # invisible to all target-org members.
        await prisma.agentgraph.update_many(
            where={"id": resource_id},
            data={"organizationId": target_org_id, "teamId": None},
        )

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Transfer the listing from the organization that actually owns it.
  2. Move the listing to the source org first if appropriate.

When it happens

Trigger: Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:221 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/a76c8890c34d020f. Report an issue: GitHub.