{"record":{"id":"749cb7c07c0a468f","repo":"diegosouzapw/OmniRoute","slug":"video-bridge-accepts-only-https-urls-or-video-data","errorCode":null,"errorMessage":"Video Bridge accepts only HTTPS URLs or video data URIs","messagePattern":"Video Bridge accepts only HTTPS URLs or video data URIs","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/videoBridgeHelpers.ts","lineNumber":510,"sourceCode":" * @param deps - Injectable external download boundary.\n * @returns Validated video bytes suitable for hashing and extraction.\n * @throws When the source, size, deadline, or abort policy rejects the input.\n */\nexport async function loadVideoPartBytes(\n  part: VideoPart,\n  maxBytes: number,\n  timeoutMs: number,\n  signal: AbortSignal,\n  deps: DescribeVideoDependencies\n): Promise<Buffer> {\n  if (signal.aborted) throw new Error(\"Video Bridge processing timed out or was aborted\");\n  const dataBytes = decodeVideoDataUri(part.ref, Math.min(maxBytes, VIDEO_BRIDGE_INLINE_MAX_BYTES));\n  let bytes: Buffer;\n  if (dataBytes) {\n    bytes = dataBytes;\n  } else {\n    if (!part.ref.startsWith(\"https://\")) {\n      throw new Error(\"Video Bridge accepts only HTTPS URLs or video data URIs\");\n    }\n    const fetchRemote =\n      deps.fetchRemote ??\n      ((url: string, options: { enforceHttps: true; signal: AbortSignal }) =>\n        fetchRemoteMedia(url, {\n          enforceHttps: options.enforceHttps,\n          guard: \"public-only\",\n          maxBytes,\n          pinDns: true,\n          signal: options.signal,\n          timeoutMs,\n        }));\n    bytes = (await fetchRemote(part.ref, { enforceHttps: true, signal })).buffer;\n  }\n  if (bytes.byteLength > maxBytes) {\n    throw new Error(\"Video exceeds the maximum size\");\n  }\n  return bytes;","sourceCodeStart":492,"sourceCodeEnd":528,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/videoBridgeHelpers.ts#L492-L528","documentation":"Error \"Video Bridge accepts only HTTPS URLs or video data URIs\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/videoBridgeHelpers.ts:510 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"}