Significant-Gravitas/AutoGPT · warning · Error
Download failed: ${res.status}
Error message
Download failed: ${res.status} What it means
Raised by execute_transfer when tr.status == 'REJECTED'. A rejected transfer can never be executed, even if both approval fields happen to be set (e.g. approved by both sides, then rejected before execution). The check runs after the approval check and before _move_resource.
Source
Thrown at autogpt_platform/frontend/src/app/(platform)/artifacts/components/ArtifactsList/helpers.ts:44
href: `/copilot?sessionId=${encodeURIComponent(sessionId)}`,
};
}
return { kind: "builder", href: "/build" };
}
export function getFileDownloadUrl(fileId: string): string {
return `/api/proxy/api/workspace/files/${encodeURIComponent(fileId)}/download`;
}
// Fetches the file as a blob and triggers a browser download. Throws on a
// non-OK response so callers can surface the error (toast) and toggle their
// own loading state.
export async function downloadFileBlob(
fileId: string,
fileName: string,
): Promise<void> {
const res = await fetch(getFileDownloadUrl(fileId));
if (!res.ok) throw new Error(`Download failed: ${res.status}`);
const blob = await res.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = fileName;
document.body.appendChild(a);
a.click();
a.remove();
// Defer revocation so browsers (Firefox/Edge) have time to start the download.
setTimeout(() => URL.revokeObjectURL(url), 0);
}
export function getFilePreviewUrl(
fileId: string,
opts: { width?: number; bytes?: number },
): string {
const params = new URLSearchParams();
if (opts.width) params.set("w", String(opts.width));View on GitHub (pinned to 9c8bb5550f)
Solutions
- Gate execute on status not being REJECTED (or COMPLETED) in addition to checking approvals.
- After catching this error, show the user the transfer was rejected and offer creating a new transfer request.
- Subscribe to status changes between approval and execution so the UI reflects a late rejection.
Example fix
# before
tr = await get_transfer(tid)
if tr.source_approved_by_user_id and tr.target_approved_by_user_id:
await execute_transfer(tid, user_id, org_id)
# after
tr = await get_transfer(tid)
if tr.status == "PENDING_BOTH_OR_APPROVED" and tr.source_approved_by_user_id and tr.target_approved_by_user_id:
await execute_transfer(tid, user_id, org_id)
else:
refresh_ui(tr) Defensive patterns
Strategy: validation
Validate before calling
tr = await get_transfer(transfer_id)
if tr.status == "REJECTED":
offer_new_transfer() # cannot execute a rejected transfer Type guard
def is_executable(tr: TransferResponse) -> bool:
return tr.status not in ("COMPLETED", "REJECTED") Try / catch
try:
await execute_transfer(tid, user_id, org_id)
except ValueError as e:
if "rejected" in str(e):
offer_new_transfer()
else:
raise Prevention
- Check status, not just approval fields, before execute
- Re-check status right before execution; reject can land after both approvals
When it happens
Trigger: Both orgs approve, then one rejects before execution, and a party later calls execute. The approval fields are both set, so the earlier checks pass, but the REJECTED status blocks the move.
Common situations: Race between reject and execute; UI built from approval fields without also consulting status; retrying an execute after someone rejected in between.
Related errors
- Failed to start OAuth flow
- Failed to reset usage
- Failed to update tier
- PKCE verifier not found in session
- Token exchange failed
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/fadba9adfb1bf8f3.
Report an issue: GitHub.