bugfix: properly pass details and msg

This commit is contained in:
AJ ONeal 2021-10-21 13:40:12 -06:00
parent c57a08f0cd
commit 6730e1321e
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ module.exports = {
* @returns {AuthError} * @returns {AuthError}
*/ */
DEVELOPER_ERROR: function (old, msg, details) { 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) { BAD_GATEWAY: function (err) {
var msg = var msg =
@ -83,7 +83,7 @@ module.exports = {
if (err.response && err.response.statusCode) { if (err.response && err.response.statusCode) {
details.push("response.statusCode = " + 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);
}, },
// //