{"record":{"id":"9386988a99808b9a","repo":"diegosouzapw/OmniRoute","slug":"stream-early-eof","errorCode":"STREAM_EARLY_EOF","errorMessage":"${classificationReason}","messagePattern":"\\$\\{classificationReason\\}","errorType":"http","errorClass":null,"httpStatus":502,"severity":"error","filePath":"open-sse/utils/streamReadiness.ts","lineNumber":580,"sourceCode":"          handedOffReader = true;\n          return { ok: true, response: buildReadyResponse() };\n        }\n\n        const classificationReason = \"Stream ended before producing a non-ping SSE event\";\n        const upstreamDiagnostic = readinessState.upstreamDiagnostic || undefined;\n        const reason = upstreamDiagnostic\n          ? `${classificationReason}: ${upstreamDiagnostic}`\n          : classificationReason;\n        options.log?.warn?.(\n          \"STREAM\",\n          `${reason} (${options.provider || \"provider\"}/${options.model || \"unknown\"})`\n        );\n        return {\n          ok: false,\n          reason,\n          classificationReason,\n          ...(upstreamDiagnostic ? { upstreamDiagnostic } : {}),\n          code: \"STREAM_EARLY_EOF\",\n          type: \"stream_early_eof\",\n          response: createErrorResponse(\n            HTTP_STATUS.BAD_GATEWAY,\n            classificationReason,\n            \"STREAM_EARLY_EOF\",\n            \"stream_early_eof\",\n            upstreamDiagnostic\n          ),\n        };\n      }\n\n      if (!readResult.value) continue;\n      chunks.push(readResult.value);\n      const decodedChunk = decoder.decode(readResult.value, { stream: true });\n\n      if (appendStreamReadinessSignal(readinessState, decodedChunk)) {\n        options.log?.debug?.(\n          \"STREAM\",","sourceCodeStart":562,"sourceCodeEnd":598,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/utils/streamReadiness.ts#L562-L598","documentation":"Error \"${classificationReason}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/utils/streamReadiness.ts:580 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"}