Significant-Gravitas/AutoGPT · error · ValueError
Source organization has already approved this transfer
Error message
Source organization has already approved this transfer
What it means
Error "Source organization has already approved this transfer" thrown in Significant-Gravitas/AutoGPT.
Source
Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:97
) -> TransferResponse:
"""Approve a transfer from the source or target side.
- If user's active org is the source org, sets sourceApprovedByUserId.
- If user's active org is the target org, sets targetApprovedByUserId.
- Advances the status accordingly.
"""
tr = await prisma.transferrequest.find_unique(where={"id": transfer_id})
if tr is None:
raise NotFoundError(f"Transfer request {transfer_id} not found")
if tr.status in ("COMPLETED", "REJECTED"):
raise ValueError(f"Cannot approve a transfer with status '{tr.status}'")
update_data: dict = {}
if org_id == tr.sourceOrganizationId:
if tr.sourceApprovedByUserId is not None:
raise ValueError("Source organization has already approved this transfer")
update_data["sourceApprovedByUserId"] = user_id
if tr.targetApprovedByUserId is not None:
# Both sides approved — ready for execution (NOT completed yet)
update_data["status"] = "TARGET_APPROVED"
else:
update_data["status"] = "SOURCE_APPROVED"
elif org_id == tr.targetOrganizationId:
if tr.targetApprovedByUserId is not None:
raise ValueError("Target organization has already approved this transfer")
update_data["targetApprovedByUserId"] = user_id
if tr.sourceApprovedByUserId is not None:
# Both sides approved — ready for execution (NOT completed yet)
update_data["status"] = "SOURCE_APPROVED"
else:
update_data["status"] = "TARGET_APPROVED"
else:View on GitHub (pinned to 9c8bb5550f)
Solutions
- No action needed; the source organization already approved.
- Wait for the target organization to approve.
When it happens
Trigger: Thrown at autogpt_platform/backend/backend/api/features/transfers/db.py:97 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/3c79daab907450c6.
Report an issue: GitHub.