{"record":{"id":"e2d14780271209c1","repo":"diegosouzapw/OmniRoute","slug":"version-metadata-response-is-too-large","errorCode":null,"errorMessage":"Version metadata response is too large","messagePattern":"Version metadata response is too large","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/system/versionCheck.ts","lineNumber":81,"sourceCode":"      [\"info\", \"omniroute\", \"version\", \"--json\"],\n      buildNpmExecOptions(process.platform, { timeoutMs: LOOKUP_TIMEOUT_MS })\n    );\n    const parsed = JSON.parse(String(stdout).trim());\n    return typeof parsed === \"string\" && parsed ? parsed : null;\n  } catch {\n    return null;\n  }\n}\n\n/**\n * Latest published version via the npm registry HTTP API. Needs only network access — no\n * `npm` binary — so it works in Docker / desktop / locked-down installs.\n */\nasync function readBoundedJson(response: Response): Promise<unknown> {\n  const declaredLength = Number(response.headers.get(\"Content-Length\"));\n  if (Number.isFinite(declaredLength) && declaredLength > MAX_VERSION_RESPONSE_BYTES) {\n    await response.body?.cancel();\n    throw new Error(\"Version metadata response is too large\");\n  }\n\n  if (!response.body) return response.json();\n  const reader = response.body.getReader();\n  const chunks: Uint8Array[] = [];\n  let totalBytes = 0;\n  try {\n    while (true) {\n      const { done, value } = await reader.read();\n      if (done) break;\n      totalBytes += value.byteLength;\n      if (totalBytes > MAX_VERSION_RESPONSE_BYTES) {\n        await reader.cancel();\n        throw new Error(\"Version metadata response is too large\");\n      }\n      chunks.push(value);\n    }\n  } finally {","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/system/versionCheck.ts#L63-L99","documentation":"Error \"Version metadata response is too large\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/system/versionCheck.ts:81 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"}