Fixes RYZEN-CONTROLLER-40 - Detect when checkForNewRelease is failing.

This commit is contained in:
Quentin DECAUNES 2019-07-30 17:12:28 +02:00
parent a7b0362f0f
commit 22be46426c

View File

@ -497,6 +497,7 @@ function checkForNewRelease() {
var request = new XMLHttpRequest(); var request = new XMLHttpRequest();
const version = require('./package.json').version; const version = require('./package.json').version;
try {
request.open('GET', 'https://gitlab.com/api/v4/projects/11046417/releases', true); request.open('GET', 'https://gitlab.com/api/v4/projects/11046417/releases', true);
request.onload = function() { request.onload = function() {
@ -509,6 +510,9 @@ function checkForNewRelease() {
}; };
request.send(); request.send();
} catch (error) {
console.log('Unable to check if new release is available.', error);
}
} }
/** /**