From e8db3a0391f27c7b81dd423f585ee5a501768adc Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Mon, 5 Jun 2017 15:07:51 +0200 Subject: [PATCH] fix(Error.custom): allow non-string code --- error/custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/error/custom.js b/error/custom.js index 71f2c137..56c6afd6 100644 --- a/error/custom.js +++ b/error/custom.js @@ -14,7 +14,7 @@ exports = module.exports = function (message/*, code, ext*/) { } } if (ext != null) assign(err, ext); - if (code != null) err.code = String(code); + if (code != null) err.code = code; if (captureStackTrace) captureStackTrace(err, exports); return err; };