{"record":{"id":"30978463d57c0df1","repo":"musistudio/claude-code-router","slug":"capture-area-must-not-be-empty","errorCode":null,"errorMessage":"Capture area must not be empty.","messagePattern":"Capture area must not be empty\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/electron/src/main/ipc.ts","lineNumber":613,"sourceCode":"\nfunction shareCardSaveDialogOptions(fileName: string): SaveDialogOptions {\n  return {\n    buttonLabel: \"Save image\",\n    defaultPath: path.join(app.getPath(\"downloads\"), safePngFileName(fileName)),\n    filters: [\n      { extensions: [\"png\"], name: \"PNG image\" }\n    ],\n    title: \"Save image\"\n  };\n}\n\nfunction sanitizeCaptureRect(rect: AppCaptureElementPngRequest[\"rect\"]): Rectangle {\n  const x = finiteNumber(rect?.x, \"capture x\");\n  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)","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/electron/src/main/ipc.ts#L595-L631","documentation":"Error \"Capture area must not be empty.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/electron/src/main/ipc.ts:613 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"}