Skip to content

Commit

Permalink
Log error mesages
Browse files Browse the repository at this point in the history
  • Loading branch information
phillmac committed May 28, 2021
1 parent daa3462 commit 27e05f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scrape-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module.exports = function (redisClient, lock, debugVerbose = false) {
}

trackerClient.on('warning', (err) => {
errors.push(err)
errors.push(err.messa)
console.warn(err)
resultsComplete()
})
Expand All @@ -112,7 +112,7 @@ module.exports = function (redisClient, lock, debugVerbose = false) {
}
function logErrors (infoHash, errors) {
if (errors.length > 0) {
return redisClient.hsetAsync('torrent_errors', infoHash, JSON.stringify(errors))
return redisClient.hsetAsync('torrent_errors', infoHash, JSON.stringify(errors.map(e => e.message)))
}
}
async function appendTrackerErrors (trackers) {
Expand Down

0 comments on commit 27e05f6

Please sign in to comment.