{"record":{"id":"5d0858aa3d681fa3","repo":"diegosouzapw/OmniRoute","slug":"unknown-mode-string-mode","errorCode":null,"errorMessage":"unknown mode: ${String(mode)}","messagePattern":"unknown mode: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"open-sse/services/compression/engines/ccr/ccrQuery.ts","lineNumber":108,"sourceCode":"}\n\nexport function queryBlock(text: string, q: CcrQuery): CcrQueryResult {\n  const mode = q.mode ?? \"full\";\n  if (mode === \"full\") return ok(text);\n  const lines = text.split(\"\\n\");\n  switch (mode) {\n    case \"head\":\n      return sliceHead(lines, q.n);\n    case \"tail\":\n      return sliceTail(lines, q.n);\n    case \"lines\":\n      return sliceLines(lines, q.start, q.end);\n    case \"grep\":\n      return grepLines(lines, q.pattern, q.unique);\n    case \"stats\":\n      return blockStats(text, lines);\n    default:\n      return err(`unknown mode: ${String(mode)}`);\n  }\n}\n","sourceCodeStart":90,"sourceCodeEnd":111,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/services/compression/engines/ccr/ccrQuery.ts#L90-L111","documentation":"ccrQuery mode dispatch default: queryBlock received a q.mode value outside the known set (full/head/tail/lines/grep/stats) — typically a typo like 'heads' or 'first'. The switch falls through to this unknown-mode error.","triggerScenarios":"Thrown at open-sse/services/compression/engines/ccr/ccrQuery.ts:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of: full, head, tail, lines, grep, stats","Omit mode — it defaults to 'full'"],"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"}