{"record":{"id":"884675843140feec","repo":"diegosouzapw/OmniRoute","slug":"sse-line-exceeded-the-size-limit","errorCode":null,"errorMessage":"SSE line exceeded the size limit","messagePattern":"SSE line exceeded the size limit","errorType":"exception","errorClass":"ClaudeWebProtocolError","httpStatus":null,"severity":"error","filePath":"open-sse/executors/claude-web/stream.ts","lineNumber":84,"sourceCode":"    this.name = \"ClaudeWebProtocolError\";\n  }\n}\n\nasync function* decodeSseData(\n  source: ReadableStream<Uint8Array>,\n  control: StreamControl\n): AsyncGenerator<string, void, void> {\n  const reader = source.getReader();\n  control.reader = reader;\n  const decoder = new TextDecoder();\n  let buffer = \"\";\n  let dataLines: string[] = [];\n  let dataChars = 0;\n  let reachedEof = false;\n\n  const consumeLine = (rawLine: string): string | null => {\n    if (rawLine.length > MAX_CLAUDE_WEB_SSE_PENDING_CHARS) {\n      throw new ClaudeWebProtocolError(\"SSE line exceeded the size limit\");\n    }\n    const line = rawLine.endsWith(\"\\r\") ? rawLine.slice(0, -1) : rawLine;\n    if (line === \"\") {\n      if (dataLines.length === 0) return null;\n      const data = dataLines.join(\"\\n\");\n      dataLines = [];\n      dataChars = 0;\n      return data;\n    }\n    if (line.startsWith(\":\")) return null;\n\n    const separatorIndex = line.indexOf(\":\");\n    const field = separatorIndex < 0 ? line : line.slice(0, separatorIndex);\n    let value = separatorIndex < 0 ? \"\" : line.slice(separatorIndex + 1);\n    if (value.startsWith(\" \")) value = value.slice(1);\n    if (field === \"data\") {\n      dataChars += value.length + (dataLines.length > 0 ? 1 : 0);\n      if (dataChars > MAX_CLAUDE_WEB_SSE_PENDING_CHARS) {","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/claude-web/stream.ts#L66-L102","documentation":"Error \"SSE line exceeded the size limit\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/claude-web/stream.ts:84 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"}