From 98a18321f5dd9575fe674834aa4315a85b6e99a7 Mon Sep 17 00:00:00 2001 From: Mikhail Rogachev Date: Tue, 16 Jun 2026 13:11:05 +0200 Subject: [PATCH] Add missing req.on('error') handler for filtyering report --- scripts/config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/config.ts b/scripts/config.ts index e2c2a036..a599d371 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -1206,6 +1206,11 @@ export const serveReportReceiverCommand = { if (req.method === 'POST') { const chunks: Buffer[] = []; req.on('data', (chunk: Buffer) => chunks.push(chunk)); + req.on('error', (err: any) => { + console.error('Request stream error:', err.message); + res.writeHead(400, {'Content-Type': 'application/json'}); + res.end(JSON.stringify({status: 'error', message: 'request stream error'})); + }); req.on('end', () => { const rawBody = Buffer.concat(chunks as Uint8Array[]); try {