{"record":{"id":"0b3bdeca523910ea","repo":"musistudio/claude-code-router","slug":"render-size-is-out-of-range","errorCode":null,"errorMessage":"Render size is out of range.","messagePattern":"Render size is out of range\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/electron/src/main/ipc.ts","lineNumber":627,"sourceCode":"  const y = finiteNumber(rect?.y, \"capture y\");\n  const width = finiteNumber(rect?.width, \"capture width\");\n  const height = finiteNumber(rect?.height, \"capture height\");\n  if (width <= 0 || height <= 0) {\n    throw new Error(\"Capture area must not be empty.\");\n  }\n  return {\n    height: Math.ceil(height),\n    width: Math.ceil(width),\n    x: Math.max(0, Math.floor(x)),\n    y: Math.max(0, Math.floor(y))\n  };\n}\n\nfunction sanitizeRenderSize(size: AppRenderHtmlPngRequest[\"size\"]): { height: number; width: number } {\n  const width = finiteNumber(size?.width, \"render width\");\n  const height = finiteNumber(size?.height, \"render height\");\n  if (width <= 0 || height <= 0 || width > 4096 || height > 4096) {\n    throw new Error(\"Render size is out of range.\");\n  }\n  return {\n    height: Math.ceil(height),\n    width: Math.ceil(width)\n  };\n}\n\nasync function waitForExportWindowPaint(window: BrowserWindow): Promise<void> {\n  await window.webContents.executeJavaScript(`\n    new Promise((resolve) => {\n      const fontsReady = document.fonts && document.fonts.ready ? document.fonts.ready.catch(() => undefined) : Promise.resolve();\n      fontsReady.then(() => {\n        requestAnimationFrame(() => requestAnimationFrame(() => resolve(true)));\n      });\n    });\n  `);\n}\n","sourceCodeStart":609,"sourceCodeEnd":645,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/electron/src/main/ipc.ts#L609-L645","documentation":"Error \"Render size is out of range.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/electron/src/main/ipc.ts:627 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"}