diegosouzapw/OmniRoute · error
pattern exceeds ${MAX_PATTERN_LEN} chars
Error message
pattern exceeds ${MAX_PATTERN_LEN} chars What it means
Error "pattern exceeds ${MAX_PATTERN_LEN} chars" thrown in diegosouzapw/OmniRoute.
Source
Thrown at open-sse/services/compression/engines/ccr/ccrQuery.ts:58
}
function sliceTail(lines: string[], n: number | undefined): CcrQueryResult {
const c = clampCount(n);
if (c === null) return err("tail requires a positive 'n'");
return ok(lines.slice(Math.max(0, lines.length - c)).join("\n"));
}
function sliceLines(lines: string[], start?: number, end?: number): CcrQueryResult {
if (typeof start !== "number" || typeof end !== "number" || start < 1 || end < 1) {
return err("lines requires positive 'start' and 'end' (1-indexed)");
}
if (start > end) return err("lines: 'start' must be <= 'end'");
return ok(lines.slice(start - 1, Math.min(end, lines.length)).join("\n"));
}
function grepLines(lines: string[], pattern?: string, unique?: boolean): CcrQueryResult {
if (!pattern) return err("grep requires a 'pattern'");
if (pattern.length > MAX_PATTERN_LEN) return err(`pattern exceeds ${MAX_PATTERN_LEN} chars`);
if (!safeRegex(pattern)) return err("pattern rejected: potentially catastrophic backtracking");
let re: RegExp;
try {
re = new RegExp(pattern);
} catch {
return err("invalid regex pattern");
}
const matched: string[] = [];
let truncated = false;
for (const line of lines) {
if (re.test(line)) {
matched.push(line);
if (matched.length >= MAX_GREP_MATCHES) {
truncated = true;
break;
}
}
}View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at open-sse/services/compression/engines/ccr/ccrQuery.ts:58 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/20a80d22e30d2bcd.
Report an issue: GitHub.