From 6730e1321e828ff4342622d825bda7a533555c16 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 21 Oct 2021 13:40:12 -0600 Subject: [PATCH] bugfix: properly pass details and msg --- lib/errors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/errors.js b/lib/errors.js index 26cf543..1141e6c 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -71,7 +71,7 @@ module.exports = { * @returns {AuthError} */ DEVELOPER_ERROR: function (old, msg, details) { - return create(old, msg, E_DEVELOPER, 500, details); + return create(old, msg || old, E_DEVELOPER, 500, details); }, BAD_GATEWAY: function (err) { var msg = @@ -83,7 +83,7 @@ module.exports = { if (err.response && err.response.statusCode) { details.push("response.statusCode = " + err.response.statusCode); } - return create(msg, msg, E_BAD_GATEWAY, 502); + return create(msg, msg, E_BAD_GATEWAY, 502, details); }, //