Update index.js

This commit is contained in:
Aleksandr Statciuk 2022-03-06 13:49:24 +03:00
parent f9ce1421c4
commit be8bb3804a
1 changed files with 5 additions and 2 deletions

View File

@ -18,9 +18,12 @@ module.exports = {
cb(item, null)
programs = programs.concat(results)
})
.catch(err => {
.catch(error => {
item.programs = []
cb(item, err)
if (config.debug) {
console.log('Error:', JSON.stringify(error, null, 2))
}
cb(item, error)
})
await utils.sleep(config.delay)