From dca4f1e49e93a35da97457556522714990e55f8d Mon Sep 17 00:00:00 2001 From: Kyle Kovacs Date: Tue, 28 Feb 2023 10:16:14 -0800 Subject: [PATCH] change callback format to properly support errors --- lib/winston/logger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/winston/logger.js b/lib/winston/logger.js index 5f8758c89..e4c463b07 100644 --- a/lib/winston/logger.js +++ b/lib/winston/logger.js @@ -473,7 +473,7 @@ class Logger extends Transform { } // eslint-disable-next-line callback-return - next(); + next(err); } next = null; @@ -485,7 +485,7 @@ class Logger extends Transform { asyncForEach( this.transports.filter(transport => !!transport.query), addResults, - () => callback(null, results) + (err) => callback(err, results) ); }