paperclipai/paperclip · error · Error

Import preview returned no data.

Error message

Import preview returned no data.

What it means

The import preview POST (transfer or inline) resolved to a falsy body, so the command cannot render what would be imported; a sentinel guard on a missing API response.

Solutions

  1. Retry the preview; if it persists, verify the source is valid and the server is reachable.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at cli/src/commands/client/company.ts:1780 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/55f200d8a8a1e186. Report an issue: GitHub.

Appendix: source

Thrown at cli/src/commands/client/company.ts:1780

                      ),
                    );
                  },
            });
          }
          const transferPreviewPath = transferId
            ? `/api/companies${companyImportTransferPreviewPath(transferId)}`
            : null;

          let selectedFiles: string[] | undefined;
          if (interactiveView && !opts.yes && !opts.include?.trim()) {
            const initialPreview = transferPreviewPath
              ? await ctx.api.post<CompanyPortabilityPreviewResult>(transferPreviewPath, transferMeta)
              : await ctx.api.post<CompanyPortabilityPreviewResult>(previewApiPath, {
                  source: sourcePayload,
                  ...transferMeta,
                });
            if (!initialPreview) {
              throw new Error("Import preview returned no data.");
            }
            selectedFiles = await promptForImportSelection(initialPreview);
          }

          const previewPayload = {
            source: sourcePayload,
            ...transferMeta,
            selectedFiles,
          };
          const preview = transferPreviewPath
            ? await ctx.api.post<CompanyPortabilityPreviewResult>(transferPreviewPath, {
                ...transferMeta,
                selectedFiles,
              })
            : await ctx.api.post<CompanyPortabilityPreviewResult>(previewApiPath, previewPayload);
          if (!preview) {
            throw new Error("Import preview returned no data.");
          }

View on GitHub (pinned to 120ae5428f)