From dbe0992d49fbebac4798b9f488d1827cd50b28f1 Mon Sep 17 00:00:00 2001 From: Rebecca Meritz Date: Fri, 17 Jul 2020 13:29:34 -0700 Subject: [PATCH] Preserve error handling behavior for bodyless err --- lib/run_action.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/run_action.js b/lib/run_action.js index db007230..e99fa0aa 100644 --- a/lib/run_action.js +++ b/lib/run_action.js @@ -69,7 +69,9 @@ function runAction(base, method, path, queryParams, bodyData, callback, numAttem resp.statusCode = resp.status; callback(error, resp, body); }) - .catch(callback); + .catch(function() { + callback(base._checkStatusForError(resp.status)); + }); } }) .catch(function(error) {