From 4dd6abaea3ec0c08b7e659a3a4dc3c3f2f81a393 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 18 Jan 2022 16:00:47 -0800 Subject: [PATCH] Fix CI script errors (#5893) --- scripts/ci/log-changesets.js | 2 +- scripts/ci/notify-test-result.js | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/ci/log-changesets.js b/scripts/ci/log-changesets.js index 6ec33a8326d..c031d998e4e 100644 --- a/scripts/ci/log-changesets.js +++ b/scripts/ci/log-changesets.js @@ -70,7 +70,7 @@ async function logChangesets() { req.on('error', error => reject(error)); - req.write(data); + req.write(data, err => reject(err)); req.end(); }); } diff --git a/scripts/ci/notify-test-result.js b/scripts/ci/notify-test-result.js index 37fd83ec628..6d2dc998885 100644 --- a/scripts/ci/notify-test-result.js +++ b/scripts/ci/notify-test-result.js @@ -75,7 +75,8 @@ async function notifyTestResults() { req.write( JSON.stringify({ text: message - }) + }), + err => reject(err) ); req.end(); }); @@ -101,10 +102,13 @@ async function notifyTestResults() { req.on('error', error => reject(error)); - req.write({ - testStatus, - testUrl: workflowUrl - }); + req.write( + JSON.stringify({ + testStatus, + testUrl: workflowUrl + }), + err => reject(err) + ); req.end(); });