paperclipai/paperclip · error

Import transfer expired — re-create it

Error message

Import transfer expired — re-create it

What it means

Transfer-state guard in resolveImportTransferBody: the chunked import transfer run is expired (the abandoned-spool sweep or TTL ended it), so its uploaded parts are gone and preview/apply cannot proceed; the client must re-create the transfer and re-upload.

Solutions

  1. Wait for the conflicting state to clear (running job, hold, pause, or stale fingerprint), refresh the current state, then retry the operation.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/companies.ts:878 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/a4ea960eaa90bbe6. Report an issue: GitHub.

Appendix: source

Thrown at server/src/routes/companies.ts:911

        // deleted out from under it; a swept or failed run is dead, so the
        // stray part is dropped and the client told to re-create.
        const current = await companyTransferRunService.getRun(db, run.id);
        if (current?.status === "applying" || current?.status === "completed") {
          throw conflict("Import transfer apply is in progress; retry after it settles");
        }
        await removeImportTransferPart(importTransferSpoolRoot, run.id, partIndex);
        res.status(410).json({ error: "Import transfer expired — re-create it" });
        return;
      }
      res.json({ ok: true, index: partIndex, alreadyCompleted: false } satisfies CompanyImportTransferPartUploadResult);
    },
  );

  // Resume polling: which parts are done, which are still missing.
  router.get(`${COMPANY_IMPORT_TRANSFERS_ROUTE_PATH}/:transferId`, async (req, res) => {
    assertBoard(req);
    const run = await requireImportTransferRun(req);
    const manifest = storedImportTransferManifest(run);
    const missingParts = run.status === "completed" ? [] : await importTransferMissingParts(run, manifest);
    res.json({
      transferId: run.id,
      status: run.status,
      totalParts: manifest.parts.length,
      completedParts: manifest.parts.length - missingParts.length,
      missingParts,
    } satisfies CompanyImportTransferStatus);
  });

  /**
   * Resolve a completed transfer into the same raw preview/import body a
   * single-shot zip upload produces: load the run, require every part, then
   * assemble the spool and verify it against the declared whole-file hash.
   * Shared by the transfer preview and apply routes; returns null after
   * responding 409 when parts are still missing. A whole-file mismatch fails
   * closed for both callers: every part verified individually but the whole
   * does not match the declaration, so the spool is deleted and a resume

View on GitHub (pinned to 01ad858492)