From 76e721bd915fcd13b9103671dbed22b7b4beed8c Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Tue, 3 Aug 2021 13:16:10 -0400 Subject: [PATCH] chore: Check for http error status codes including 400 --- ui/desktop/electron-app/config/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/desktop/electron-app/config/cli.js b/ui/desktop/electron-app/config/cli.js index a07585ae0..c2f06d13d 100644 --- a/ui/desktop/electron-app/config/cli.js +++ b/ui/desktop/electron-app/config/cli.js @@ -33,7 +33,7 @@ const downloadArtifact = (version) => { const artifactPath = path.resolve(tmpDir, artifactFileName); console.log('Download artifact url: ', url); https.get(url, (response) => { - if (response.statusCode > 400) reject('Could not access artifact url.'); + if (response.statusCode >= 400) reject('Could not access artifact url.'); const stream = response.pipe(fs.createWriteStream(artifactPath)); stream.on('close', () => resolve(artifactPath)); stream.on('error', reject);