BigPizzaV3/CodexPlusPlus · error
导出结果不完整
Error message
导出结果不完整
What it means
downloadMarkdownFallback() is the anchor-download path used when the File System Access API is unavailable. It validates its inputs first: a non-empty filename and a string markdown body are required to build the Blob and trigger the download; otherwise it throws "导出结果不完整".
Solutions
- Ensure the markdown is fully generated (await the export/render step) before calling the fallback.
- Validate filename and markdown type at the call site and show a user-facing "nothing to export" message.
- Fix callers that pass (filename, {markdown}) instead of (filename, markdown).
- Guard with `if (!markdown) return` upstream instead of letting the fallback throw.
Example fix
// before
downloadMarkdownFallback(exportName, maybeMarkdown);
// after
if (typeof maybeMarkdown === "string" && maybeMarkdown.length && exportName) {
downloadMarkdownFallback(exportName, maybeMarkdown);
} else {
showToast("导出内容为空,无法下载");
} Defensive patterns
Strategy: validation
Validate before calling
if (!filename || typeof markdown !== "string" || !markdown.trim()) { showToast("导出内容为空"); return; } Type guard
function isExportReady(filename, markdown) { return typeof filename === "string" && filename.length > 0 && typeof markdown === "string"; } Try / catch
try { downloadMarkdownFallback(filename, markdown); } catch (e) { if (e.message === "导出结果不完整") showToast("没有可导出的内容"); else throw e; } Prevention
- Always await the content-generation step before exporting.
- Provide a default filename when template interpolation could be empty.
- Validate payload shape at the export button handler, not deep in the fallback.
When it happens
Trigger: Calling downloadMarkdownFallback(filename, markdown) with filename === ""/null/undefined or markdown not a string (null/undefined/object) — typically when the export pipeline produced no content and the caller passed it through unguarded.
Common situations: Conversation export ran before the transcript finished loading (empty markdown); a refactor changed saveMarkdown's signature and callers pass an options object; clipboard/stream source returned null on failure.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- 主题包必须是 32 MiB 以内的普通 ZIP 文件
- 请填写 API 的模型名称
- 官方混合 API 不应在 auth.json 中保存 OPENAI_API_KEY。请清理此供应商的…
- 请填写 API 的模型名称
- API 地址须使用 HTTPS,且不含账号、密码、查询参数或片段
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19).
Data as JSON: /api/errors/c7ac86f909dd470a.
Report an issue: GitHub.
Appendix: source
Thrown at assets/inject/renderer-inject.js:6400
httpStatus: 200,
responseStatus: fallback.status || "",
});
return fallback;
}
sendCodexPlusDiagnostic("backend_status_bridge_and_http_failed", {
path,
errorName: error?.name || "",
errorMessage: error?.message || String(error),
});
return fallback;
}
throw error;
}
}
function downloadMarkdownFallback(filename, markdown) {
if (!filename || typeof markdown !== "string") {
throw new Error("导出结果不完整");
}
const blob = new Blob([markdown], { type: "text/markdown;charset=utf-8" });
const url = URL.createObjectURL(blob);
const anchor = document.createElement("a");
anchor.href = url;
anchor.download = filename;
document.body.appendChild(anchor);
anchor.click();
anchor.remove();
setTimeout(() => URL.revokeObjectURL(url), 1000);
}
async function saveMarkdown(filename, markdown) {
if (!filename || typeof markdown !== "string") {
throw new Error("导出结果不完整");
}
if (typeof window.showSaveFilePicker !== "function") {
downloadMarkdownFallback(filename, markdown);View on GitHub (pinned to b1ed92e5e4)