{"record":{"id":"6265764549a06e14","repo":"GopeedLab/gopeed","slug":"already-read","errorCode":null,"errorMessage":"Already read","messagePattern":"Already read","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"pkg/download/engine/inject/stream/stream.js","lineNumber":451,"sourceCode":"    }\n    const merged = new Uint8Array(total);\n    let offset = 0;\n    for (const chunk of chunks) {\n      merged.set(chunk, offset);\n      offset += chunk.byteLength;\n    }\n    if (asText) {\n      return new TextDecoder().decode(merged);\n    }\n    return merged;\n  }\n\n  function attachResponseStreaming(response, stream) {\n    response.__gopeedBodyStream = stream;\n    response.__gopeedBodyConsumed = false;\n    const ensureUnused = () => {\n      if (response.__gopeedBodyConsumed) {\n        throw new TypeError(\"Already read\");\n      }\n    };\n    const markBodyUsed = () => {\n      ensureUnused();\n      response.__gopeedBodyConsumed = true;\n      response.bodyUsed = true;\n    };\n    if (stream) {\n      stream.__gopeedMarkBodyUsed = () => {\n        if (!response.__gopeedBodyConsumed) {\n          response.__gopeedBodyConsumed = true;\n          response.bodyUsed = true;\n        }\n      };\n    }\n    response.text = async function () {\n      ensureUnused();\n      markBodyUsed();","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/GopeedLab/gopeed/blob/7b7327ffb30816273a74b142cccc0bc10c5a4c67/pkg/download/engine/inject/stream/stream.js#L433-L469","documentation":"Error \"Already read\" thrown in GopeedLab/gopeed.","triggerScenarios":"Thrown at pkg/download/engine/inject/stream/stream.js:451 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":"7b7327ffb30816273a74b142cccc0bc10c5a4c67","analyzedAt":"2026-08-16T02:51:03.250Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}