{"record":{"id":"f1f6121e202839a7","repo":"musistudio/claude-code-router","slug":"image-export-target-is-unavailable","errorCode":null,"errorMessage":"Image export target is unavailable.","messagePattern":"Image export target is unavailable\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/electron/src/main/ipc.ts","lineNumber":663,"sourceCode":"\nfunction finiteNumber(value: unknown, label: string): number {\n  if (typeof value !== \"number\" || !Number.isFinite(value)) {\n    throw new Error(`Invalid ${label}.`);\n  }\n  return value;\n}\n\nfunction safePngFileName(value: string): string {\n  const raw = typeof value === \"string\" ? value : \"\";\n  const safe = path.basename(raw).replace(/[<>:\"/\\\\|?*\\x00-\\x1f]/g, \"-\").trim() || \"ccr-share-card.png\";\n  return safe.toLowerCase().endsWith(\".png\") ? safe : `${safe}.png`;\n}\n\nfunction consumeImageExportTarget(exportId: string): string {\n  const target = imageExportTargets.get(exportId);\n  imageExportTargets.delete(exportId);\n  if (!target) {\n    throw new Error(\"Image export target is unavailable.\");\n  }\n  return target;\n}\n\nconst pngSignature = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);\n\ntype PngExportProcessingRequest = {\n  borderRadius?: number;\n  output?: {\n    height: number;\n    width: number;\n  };\n};\n\ntype DecodedPngPixels = {\n  bitDepth: number;\n  colorType: 2 | 6;\n  height: number;","sourceCodeStart":645,"sourceCodeEnd":681,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/electron/src/main/ipc.ts#L645-L681","documentation":"Error \"Image export target is unavailable.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/electron/src/main/ipc.ts:663 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"}