paperclipai/paperclip · error · Error
Import transfer declaration returned no data.
Error message
Import transfer declaration returned no data.
What it means
uploadCompanyImportTransfer posted the transfer manifest but the API client resolved to a falsy body, so the created-transfer record (id, missing parts) is unavailable and the upload cannot proceed.
Solutions
- Retry the transfer; if it persists, verify the server is reachable and the export package is intact.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at cli/src/commands/client/company.ts:1158 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/7d9293dda3ae7a7c.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/client/company.ts:1158
}
/**
* Declare (or resume) the transfer for these zip bytes and upload every part
* the server reports missing, sequentially with per-part retries. Resolves
* with the transfer id once the server holds every part.
*/
export async function uploadCompanyImportTransfer(
api: Pick<PaperclipApiClient, "post" | "putRaw">,
zipBytes: Uint8Array,
opts: { onProgress?: (progress: ImportTransferUploadProgress) => void } = {},
): Promise<string> {
const manifest = buildImportTransferManifest(zipBytes);
const created = await api.post<CompanyImportTransferCreated>(
`/api/companies${COMPANY_IMPORT_TRANSFERS_ROUTE_PATH}`,
manifest,
);
if (!created) {
throw new Error("Import transfer declaration returned no data.");
}
if (created.alreadyCompleted) {
// The server keys transfers by content, and this exact zip already
// finished an apply — its spooled parts are gone, so it cannot re-run.
throw new Error(
"This exact package was already imported by a completed transfer. Re-export the package to import it again.",
);
}
const missing = new Set(created.missingParts);
let uploadedParts = manifest.parts.length - missing.size;
let uploadedBytes = manifest.parts.reduce(
(sum, part) => (missing.has(part.index) ? sum : sum + part.byteSize),
0,
);
for (const part of manifest.parts) {
if (!missing.has(part.index)) continue;
const offset = part.index * manifest.partSizeBytes;
const bytes = zipBytes.subarray(offset, offset + part.byteSize);View on GitHub (pinned to 120ae5428f)