We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d969097 commit a18fda2Copy full SHA for a18fda2
lib/http-error.js
@@ -1,13 +1,14 @@
1
module.exports = class HttpError extends Error {
2
- constructor (message, code, headers) {
+ constructor (message, code) {
3
super(message)
4
5
- // Maintains proper stack trace
+ // Maintains proper stack trace (only available on V8)
6
+ /* istanbul ignore next */
7
if (Error.captureStackTrace) {
8
Error.captureStackTrace(this, this.constructor)
9
}
10
+
11
this.name = 'HttpError'
12
this.code = code
- this.headers = headers
13
14
0 commit comments