From f47f9e2a6cf2701f01026e8b72e6f5a5fa1912ef Mon Sep 17 00:00:00 2001 From: Antoine ORY-LAMBALLE Date: Thu, 30 Sep 2021 14:59:16 +0200 Subject: [PATCH] fix: propagate errors happening in eachPage callback --- src/run_action.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/run_action.ts b/src/run_action.ts index 4c890a7e..d94259f1 100644 --- a/src/run_action.ts +++ b/src/run_action.ts @@ -86,8 +86,8 @@ function runAction( r.statusCode = resp.status; callback(error, r, body); }) - .catch(function() { - callback(base._checkStatusForError(resp.status)); + .catch(function(e) { + callback(base._checkStatusForError(resp.status) || e); }); } })