Add error handler to third test's client script

Added req.on('error') handler to match the pattern used in the first test,
ensuring consistent error handling and debuggable failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Bot
2026-01-31 19:38:36 +00:00
parent 08baed00ae
commit cb26928b62

View File

@@ -270,6 +270,11 @@ const req = https.request('https://localhost:${server.port}/', {
}); });
}); });
req.on('error', (e) => {
console.error('Request error:', e.message);
process.exit(1);
});
// Write many chunks as fast as possible // Write many chunks as fast as possible
const chunk = '${chunkContent}'; const chunk = '${chunkContent}';
for (let i = 0; i < numChunks; i++) { for (let i = 0; i < numChunks; i++) {