{"record":{"id":"088ae8fc7dc5b045","repo":"musistudio/claude-code-router","slug":"export-html-is-empty","errorCode":null,"errorMessage":"Export HTML is empty.","messagePattern":"Export HTML is empty\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/electron/src/main/ipc.ts","lineNumber":506,"sourceCode":"    throw new Error(\"Window is unavailable.\");\n  }\n\n  const rect = sanitizeCaptureRect(request.rect);\n  const result = await imageExportFile(window, request.fileName, request.exportId);\n  if (result.canceled || !result.filePath) {\n    return { canceled: true };\n  }\n\n  const image = await window.webContents.capturePage(rect);\n  const png = image.toPNG();\n  writeFileSync(result.filePath, pngWithExportProcessing(png, request, rect.width), { mode: 0o600 });\n  return { canceled: false, file: result.filePath };\n}\n\nasync function renderHtmlPng(window: BrowserWindow | null, request: AppRenderHtmlPngRequest): Promise<AppRenderHtmlPngResult> {\n  const html = typeof request.html === \"string\" ? request.html : \"\";\n  if (!html.trim()) {\n    throw new Error(\"Export HTML is empty.\");\n  }\n\n  const size = sanitizeRenderSize(request.size);\n  const result = await imageExportFile(window, request.fileName, request.exportId);\n  if (result.canceled || !result.filePath) {\n    return { canceled: true };\n  }\n\n  const renderWindow = new BrowserWindow({\n    backgroundColor: \"#00000000\",\n    frame: false,\n    height: size.height,\n    paintWhenInitiallyHidden: true,\n    resizable: false,\n    show: false,\n    skipTaskbar: true,\n    transparent: true,\n    useContentSize: true,","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/electron/src/main/ipc.ts#L488-L524","documentation":"Error \"Export HTML is empty.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/electron/src/main/ipc.ts:506 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}