{"record":{"id":"1eab0c4a0ca44545","repo":"heygen-com/hyperframes","slug":"unsupported-cube-keyword-keyword","errorCode":null,"errorMessage":"Unsupported cube keyword ${keyword}","messagePattern":"Unsupported cube keyword (.+?)","errorType":"validation","errorClass":"CubeLutParseError","httpStatus":null,"severity":"error","filePath":"packages/core/src/colorLuts.ts","lineNumber":152,"sourceCode":"      domainMin = [min, min, min];\n      domainMax = [max, max, max];\n      continue;\n    }\n    if (keyword === \"LUT_1D_SIZE\") {\n      lut1dSize = parseSize(rest[0], keyword, lineNumber);\n      continue;\n    }\n    if (keyword === \"LUT_3D_SIZE\") {\n      lut3dSize = parseSize(rest[0], keyword, lineNumber);\n      if (lut3dSize > maxSize) {\n        throw new CubeLutParseError(`LUT_3D_SIZE ${lut3dSize} exceeds max ${maxSize}`, lineNumber);\n      }\n      continue;\n    }\n\n    if (!isNumericDataLine(keyword)) {\n      if (keyword.startsWith(\"LUT_\")) {\n        throw new CubeLutParseError(`Unsupported cube keyword ${keyword}`, lineNumber);\n      }\n      continue;\n    }\n    if (!lut3dSize) {\n      if (lut1dSize) {\n        throw new CubeLutParseError(\"1D cube LUTs are not supported yet\", lineNumber);\n      }\n      throw new CubeLutParseError(\"LUT data appears before LUT_3D_SIZE\", lineNumber);\n    }\n    if (parts.length !== 3) {\n      throw new CubeLutParseError(\"LUT data rows must contain three numbers\", lineNumber);\n    }\n    rows.push(\n      parseFiniteNumber(parts[0]!, lineNumber),\n      parseFiniteNumber(parts[1]!, lineNumber),\n      parseFiniteNumber(parts[2]!, lineNumber),\n    );\n  }","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/core/src/colorLuts.ts#L134-L170","documentation":"The parser recognizes only LUT_1D_SIZE, LUT_3D_SIZE, and LUT_3D_INPUT_RANGE among LUT_-prefixed keywords. Any other LUT_-prefixed keyword on a non-numeric line throws at line 152, so unsupported or misspelled extensions fail loudly rather than being silently dropped.","triggerScenarios":"A line such as 'LUT_2D_SIZE 8', 'LUT_FOO 1', or a vendor extension like 'LUT_VERSION 2' that is not numeric data.","commonSituations":"Vendor-extended .cube dialects; a typo such as 'LUT_3D_SISE'; future-format files using keywords this parser version does not know.","solutions":["Strip or comment out (with '#') any LUT_-prefixed lines the parser does not support.","Fix the typo if the keyword was meant to be LUT_1D_SIZE / LUT_3D_SIZE / LUT_3D_INPUT_RANGE.","Upgrade the package if a newer version supports the keyword."],"exampleFix":"// before\nLUT_3D_SISE 32\nLUT_VERSION 2\n\n// after\nLUT_3D_SIZE 32\n# LUT_VERSION 2","handlingStrategy":"try-catch","validationCode":"const SUPPORTED_LUT_KEYWORDS = new Set(['LUT_1D_SIZE', 'LUT_3D_SIZE', 'LUT_3D_INPUT_RANGE']);\n\nfunction assertNoUnsupportedLutKeywords(fileText: string): void {\n  for (const line of fileText.split(/\\r?\\n/)) {\n    const kw = (line.trim().split(/\\s+/)[0] ?? '').toUpperCase();\n    if (kw.startsWith('LUT_') && !SUPPORTED_LUT_KEYWORDS.has(kw) && !/^[-+\\d.]/.test(kw)) {\n      throw new Error(`Unsupported cube keyword: ${kw}`);\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  parseCubeLut(fileText);\n} catch (err) {\n  if (err instanceof CubeLutParseError && /Unsupported cube keyword/.test(err.message)) {\n    // comment out the offending line and retry, or surface to user\n  } else throw err;\n}","preventionTips":["Comment out (with '#') any LUT_-prefixed lines you do not recognize.","Re-export from the source tool to drop vendor extensions.","Upgrade the package when support for the keyword is added."],"tags":["lut","cube","parsing","keyword"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}