alternate way of keeping ws up when no active tasks

This commit is contained in:
Dave Horton
2022-02-24 13:34:21 -05:00
parent 12f0e9348e
commit 221cd8bd0d
2 changed files with 34 additions and 4 deletions

View File

@@ -192,8 +192,8 @@ module.exports = function(srf, logger) {
if (0 === app.tasks.length) throw new Error('no application provided');
next();
} catch (err) {
logger.info({err}, `Error retrieving or parsing application: ${err.message}`);
res.send(480, {headers: {'X-Reason': err.message}});
logger.info({err}, `Error retrieving or parsing application: ${err?.message}`);
res.send(480, {headers: {'X-Reason': err?.message || 'unknown'}});
}
}