From 27e05f6a378398531210b7328e7759cfdf0f029b Mon Sep 17 00:00:00 2001 From: phillmac Date: Fri, 28 May 2021 00:29:14 +0000 Subject: [PATCH] Log error mesages --- src/scrape-functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scrape-functions.js b/src/scrape-functions.js index 5137e72..c23d42b 100644 --- a/src/scrape-functions.js +++ b/src/scrape-functions.js @@ -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() }) @@ -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) {