paperclipai/paperclip · error

Import job not found

Error message

Import job not found

What it means

Not-found equivalence guard on GET /import/jobs/:jobId: the import job id is unknown, expired from retention, or was created by a different actor key. All cases return the same 404 so import job ids cannot be probed across actors.

Source

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

    res.json(buildExportFidelityReport(companyId, counts));
  });

  /**
   * Floor for the whole company-import surface: single-shot upload, preview,
   * job polling, chunked transfers, and the per-company agent-safe import
   * routes. Two independent signals close it, both checked up front — before
   * auth or body work, the same way the company-creation floor does:
   *
   * - a cloud-managed instance (`cloud_managed`): the hosting platform
   *   provisions the company, so materializing imported companies on a
   *   managed instance is disabled unconditionally;
   * - the operator hiding the Import page (`company.import` in
   *   `PAPERCLIP_HIDDEN_SETTINGS` → `settings_operator_managed`): hiding the
   *   page also disables its API, so the hide is real rather than cosmetic.
   *
   * Export routes stay open either way — they are the tenant's
   * data-portability escape hatch.
   */
  const importFloor = (_req: Request, _res: Response, next: NextFunction) => {
    if (isCloudManagedInstance()) {
      throw forbidden("Company import is disabled on cloud-managed instances", {
        code: "cloud_managed",
      });
    }
    if (hidesCompanyPage(getHiddenSettings(), "company.import")) {
      throw forbidden("Company import is hidden by the hosting operator", {
        code: SETTINGS_OPERATOR_MANAGED_ERROR_CODE,
      });
    }
    next();
  };
  // COMPANY_IMPORT_TRANSFERS_ROUTE_PATH nests under the import path, so these
  // two prefixes cover every import route registered below.
  router.use(COMPANY_IMPORT_ROUTE_PATH, importFloor);
  router.use("/:companyId/imports", importFloor);

View on GitHub (pinned to 01ad858492)

Solutions

  1. Verify the id in the request path or body refers to an existing record in this company; re-list the parent collection to get a valid id.
  2. Check that the record was not deleted or archived, and that the request is scoped to the correct companyId.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/companies.ts:524 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/7fafc3637d8cef05. Report an issue: GitHub.