{"record":{"id":"88fa9297ee73a116","repo":"diegosouzapw/OmniRoute","slug":"message","errorCode":null,"errorMessage":"${message}","messagePattern":"\\$\\{message\\}","errorType":"validation","errorClass":"VideoDrilldownValidationError","httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/videoBridgeDrilldown.ts","lineNumber":109,"sourceCode":"}\n\ninterface StoredDrilldownFrame {\n  data: Buffer;\n  height: number;\n  timestampSeconds: number;\n  width: number;\n}\n\nexport const VIDEO_DRILLDOWN_MAX_FRAME_BYTES = 4 * 1024 * 1024;\nexport const VIDEO_DRILLDOWN_MAX_ENTRY_BYTES = 32 * 1024 * 1024;\nconst MAX_DURATION_SECONDS = 600;\nconst MAX_FRAME_DIMENSION = 8192;\nconst JPEG_DATA_URI_PREFIX = \"data:image/jpeg;base64,\";\nexport const VIDEO_DRILLDOWN_MAX_FRAME_DATA_URI_CHARS =\n  JPEG_DATA_URI_PREFIX.length + Math.ceil(VIDEO_DRILLDOWN_MAX_FRAME_BYTES / 3) * 4;\n\nfunction validationFailure(message: string): never {\n  throw new VideoDrilldownValidationError(message);\n}\n\nfunction throwIfAborted(signal?: AbortSignal): void {\n  if (signal?.aborted) throw new VideoDrilldownAbortedError();\n}\n\nfunction yieldToEventLoop(): Promise<void> {\n  return new Promise((resolve) => setImmediate(resolve));\n}\n\nfunction isAsciiAlphaNumeric(code: number): boolean {\n  return (\n    (code >= 0x30 && code <= 0x39) ||\n    (code >= 0x41 && code <= 0x5a) ||\n    (code >= 0x61 && code <= 0x7a)\n  );\n}\n","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/videoBridgeDrilldown.ts#L91-L127","documentation":"Generic validation-failure helper (validationFailure) in videoBridgeDrilldown: throws VideoDrilldownValidationError with a dynamic message for any input violating drilldown limits — oversized frames (VIDEO_DRILLDOWN_MAX_FRAME_BYTES), oversized entries, duration > 600s, frame dimension > 8192, or non-canonical JPEG data URIs. The specific at-fault input is named in the dynamic message text.","triggerScenarios":"Thrown at src/lib/guardrails/videoBridgeDrilldown.ts:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the dynamic message to identify which limit was violated","Re-encode frames to canonical JPEG within the 4MB/frame and 8192px limits","Split oversized drilldown entries instead of storing one >32MB blob","Reject such uploads earlier at the request-validation boundary"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}