Gracefully handle plugin versions check if one plugin causes an error
Ryan Blenis committed
Nov 24, 2019 at 21:29 UTC
ea2473f0a3f746c1c7ec9878e28b85631458bc94
1 file changed
+7
-2
pluginHandler.js
+7
-2
@@ -260,11 +260,16 @@ module.exports.pluginHandler = function (parent) {
260
parent.db.getPlugins(function(err, plugins) {
261
var proms = [];
262
plugins.forEach(function(curconf) {
263
- proms.push(obj.getPluginConfig(curconf.configUrl));
263
+ proms.push(obj.getPluginConfig(curconf.configUrl).catch(e => { return null; } ));
264
});
265
var latestRet = [];
266
Promise.all(proms).then(function(newconfs) {
267
- newconfs.forEach(function(newconf) {
267
+ var nconfs = [];
268
+ // filter out config download issues
269
+ newconfs.forEach(function(nc) {
270
+ if (nc !== null) nconfs.push(nc);
271
+ });
272
+ nconfs.forEach(function(newconf) {
273
var curconf = null;
274
plugins.forEach(function(conf) {
275
if (conf.configUrl == newconf.configUrl) curconf = conf;