aboutsummaryrefslogtreecommitdiff
path: root/src/extras/requests.js
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2022-08-06 22:46:41 +0200
committerAlystrasz <contact@remyraes.com>2022-08-06 22:46:41 +0200
commitc4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb (patch)
tree3e87472e0977d6c0226216f8771da14de6515519 /src/extras/requests.js
parent944363c06995196f68a57997973b11eac93d7d59 (diff)
downloadViper-c4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb.tar.gz
Viper-c4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb.zip
feat: getLatestNsVersion returns false if no Internet
Diffstat (limited to 'src/extras/requests.js')
-rw-r--r--src/extras/requests.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/extras/requests.js b/src/extras/requests.js
index c609da3..6066e90 100644
--- a/src/extras/requests.js
+++ b/src/extras/requests.js
@@ -58,6 +58,11 @@ async function getLatestNsVersion() {
_saveCache(cache);
resolve( cache[NORTHSTAR_LATEST_RELEASE_KEY]["body"]["tag_name"] );
});
+ })
+
+ .on('error', () => {
+ console.error('Failed to get latest Northstar version.');
+ resolve( false );
});
}
});