{"record":{"id":"0d209889bd894707","repo":"diegosouzapw/OmniRoute","slug":"msg","errorCode":null,"errorMessage":"${msg}","messagePattern":"\\$\\{msg\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/hyperagent.ts","lineNumber":725,"sourceCode":"      return;\n    }\n    events += 1;\n    const type = readStr(obj.type);\n    if (type === \"text\") {\n      text += typeof obj.content === \"string\" ? obj.content : \"\";\n    } else if (type === \"session_start\") {\n      const sid = readStr(obj.sessionId);\n      if (sid) sessionId = sid;\n    } else if (type === \"thread_runtime_latched\") {\n      const mid = readStr(obj.modelId);\n      if (mid) modelId = mid;\n    } else if (type === \"error\" || type === \"stream_error\") {\n      const msg =\n        readStr(obj.content) ||\n        readStr(obj.message) ||\n        readStr(obj.error) ||\n        \"HyperAgent stream error\";\n      throw new Error(msg);\n    }\n  };\n\n  while (true) {\n    const { done, value } = await reader.read();\n    if (done) break;\n    buffer += decoder.decode(value, { stream: true });\n    // Split SSE frames\n    const parts = buffer.split(\"\\n\");\n    buffer = parts.pop() || \"\";\n    for (const line of parts) {\n      const t = line.trimEnd();\n      if (t.startsWith(\"data:\")) {\n        handleData(t.slice(5).trimStart());\n      }\n    }\n  }\n  if (buffer.trim()) {","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/hyperagent.ts#L707-L743","documentation":"Error \"${msg}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/hyperagent.ts:725 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"}