aboutsummaryrefslogtreecommitdiff
path: root/node_modules/node-fetch/lib
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/node-fetch/lib')
-rw-r--r--node_modules/node-fetch/lib/fetch-error.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/node_modules/node-fetch/lib/fetch-error.js b/node_modules/node-fetch/lib/fetch-error.js
index 7cabfb3ce..a48eb828c 100644
--- a/node_modules/node-fetch/lib/fetch-error.js
+++ b/node_modules/node-fetch/lib/fetch-error.js
@@ -17,9 +17,6 @@ module.exports = FetchError;
*/
function FetchError(message, type, systemError) {
- // hide custom error implementation details from end-users
- Error.captureStackTrace(this, this.constructor);
-
this.name = this.constructor.name;
this.message = message;
this.type = type;
@@ -29,6 +26,8 @@ function FetchError(message, type, systemError) {
this.code = this.errno = systemError.code;
}
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
}
require('util').inherits(FetchError, Error);