{"record":{"id":"b2506a033212fd65","repo":"diegosouzapw/OmniRoute","slug":"version-version-not-found","errorCode":null,"errorMessage":"Version ${version} not found","messagePattern":"Version (.+?) not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/versionManager/binaryManager.ts","lineNumber":145,"sourceCode":"  for (const name of candidates) {\n    if (fsSync.existsSync(path.join(/* turbopackIgnore: true */ dir, name))) {\n      return path.join(/* turbopackIgnore: true */ dir, name);\n    }\n  }\n  return null;\n}\n\nexport async function downloadRelease(\n  version: string,\n  targetDir: string,\n  signal?: AbortSignal,\n  // Optional pre-detected target: lets a top-level orchestrator (installVersion)\n  // read the runtime platform/arch exactly once and pass the value down instead of\n  // this function independently re-reading os.platform()/os.arch() (#10244/#10293).\n  target?: { platform: Platform; arch: Arch }\n): Promise<string> {\n  const release = await getReleaseByVersion(version);\n  if (!release) throw new Error(`Version ${version} not found`);\n\n  const { platform, arch } = target || getTargetPlatform();\n  const ext = platform === \"windows\" ? \".zip\" : \".tar.gz\";\n  const assetName = `CLIProxyAPI_${release.version}_${platform}_${arch}${ext}`;\n  const asset = release.assets.find((a) => a.name === assetName);\n  if (!asset) throw new Error(`No asset for ${platform}/${arch}`);\n\n  const versionDir = path.join(targetDir, `cliproxyapi-${version}`);\n  await fs.mkdir(versionDir, { recursive: true });\n\n  const archivePath = path.join(versionDir, assetName);\n  await downloadFile(asset.url, archivePath, signal);\n\n  const checksums = await getChecksums(version);\n  if (checksums.size > 0) {\n    const expected = checksums.get(assetName);\n    if (expected) {\n      const valid = await verifyChecksum(archivePath, expected);","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/versionManager/binaryManager.ts#L127-L163","documentation":"Error \"Version ${version} not found\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/versionManager/binaryManager.ts:145 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}