Loading lib/errors.js +10 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ function RequestError(cause) { this.message = String(cause); this.cause = cause; if(Error.captureStackTrace){ Error.captureStackTrace(this); } else { Error.call(this); } } RequestError.prototype = Object.create(Error.prototype); Loading @@ -20,7 +24,11 @@ function StatusCodeError(statusCode, message) { this.statusCode = statusCode; this.message = statusCode + ' - ' + message; if(Error.captureStackTrace){ Error.captureStackTrace(this); } else { Error.call(this); } } StatusCodeError.prototype = Object.create(Error.prototype); Loading Loading
lib/errors.js +10 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ function RequestError(cause) { this.message = String(cause); this.cause = cause; if(Error.captureStackTrace){ Error.captureStackTrace(this); } else { Error.call(this); } } RequestError.prototype = Object.create(Error.prototype); Loading @@ -20,7 +24,11 @@ function StatusCodeError(statusCode, message) { this.statusCode = statusCode; this.message = statusCode + ' - ' + message; if(Error.captureStackTrace){ Error.captureStackTrace(this); } else { Error.call(this); } } StatusCodeError.prototype = Object.create(Error.prototype); Loading