paperclipai/paperclip · error · Error
Import request returned no data.
Error message
Import request returned no data.
What it means
Thrown after the final import apply POST (transfer apply path or importApiPath) resolves to null. The apply endpoint must return a CompanyPortabilityImportResult describing the created/updated company; null (204/empty/ignored-404) means the server applied nothing or failed silently. This is the terminal step — by this point preview succeeded.
Source
Thrown at cli/src/commands/client/company.ts:1862
}
}
const importApiPath = resolveCompanyImportApiPath({
dryRun: false,
targetMode: targetPayload.mode,
companyId: targetPayload.mode === "existing_company" ? targetPayload.companyId : null,
});
const imported = transferId
? await ctx.api.post<CompanyPortabilityImportResult>(
`/api/companies${companyImportTransferApplyPath(transferId)}`,
{ ...transferMeta, selectedFiles, adapterOverrides },
)
: await ctx.api.post<CompanyPortabilityImportResult>(importApiPath, {
...previewPayload,
adapterOverrides,
});
if (!imported) {
throw new Error("Import request returned no data.");
}
const tc = getTelemetryClient();
if (tc) {
const isPrivate = sourcePayload.type !== "github";
const sourceRef = sourcePayload.type === "github" ? sourcePayload.url : from;
trackCompanyImported(tc, { sourceType: sourcePayload.type, sourceRef, isPrivate });
}
let companyUrl: string | undefined;
if (!ctx.json) {
try {
const importedCompany = await ctx.api.get<Company>(apiPath`/api/companies/${imported.company.id}`);
const issuePrefix = importedCompany?.issuePrefix?.trim();
if (issuePrefix) {
companyUrl = buildCompanyDashboardUrl(ctx.api.apiBase, issuePrefix);
}
} catch {
companyUrl = undefined;
}View on GitHub (pinned to 67001ec6eb)
Solutions
- Check whether the company was actually created despite the error: `paperclipai company list --json`.
- Inspect server logs around the apply handler for an exception after the work committed.
- Increase proxy/gateway timeouts for the apply route if imports are large.
- Retry the import; if collision mode is 'rename'/'skip' it will not duplicate.
Defensive patterns
Strategy: try-catch
Validate before calling
// After an apply, verify the company actually exists even if the response was empty.
async function verifyImportSucceeded(api: { get: (p: string) => Promise<unknown> }, companyId: string): Promise<boolean> {
try { const c = await api.get(`/api/companies/${companyId}`); return c != null; } catch { return false; }
} Type guard
import type { CompanyPortabilityImportResult } from "@paperclipai/shared";
function isImportResult(v: unknown): v is CompanyPortabilityImportResult {
return !!v && typeof v === "object"
&& !!((v as any).company)
&& typeof (v as any).company.id === "string";
} Try / catch
try {
const imported = await ctx.api.post<CompanyPortabilityImportResult>(path, payload);
if (!isImportResult(imported)) {
// The apply may have partially succeeded; verify before retrying.
throw new Error("Import apply returned no result; verify company list before retry.");
}
} catch (err) {
throw err;
} Prevention
- Use collision mode 'rename' or 'skip' so retries do not duplicate data.
- Raise proxy timeouts for the apply route; large imports are slow.
- After a suspicious apply, always list companies before re-running.
When it happens
Trigger: Preview worked but apply returns 204/empty; server applies the import then crashes/errors before serializing the result; transferId apply sub-path returning empty; a long-running apply hitting a proxy idle timeout that returns an empty 204.
Common situations: Large import that exceeds a reverse-proxy response timeout; server bug in the apply serialization step; partial server failure where resources were created but no response body returned.
Related errors
- Export request returned no data
- Import preview returned no data.
- CLI auth challenge expired before approval.
- Source path or URL is required.
- Invalid --collision value. Use: rename, skip, replace
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/9e4e29ea5e6b0794.
Report an issue: GitHub.