Skip to content

Commit a18fda2

Browse files
committed
fix: remove undocumented error.headers
1 parent d969097 commit a18fda2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/http-error.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
module.exports = class HttpError extends Error {
2-
constructor (message, code, headers) {
2+
constructor (message, code) {
33
super(message)
44

5-
// Maintains proper stack trace
5+
// Maintains proper stack trace (only available on V8)
6+
/* istanbul ignore next */
67
if (Error.captureStackTrace) {
78
Error.captureStackTrace(this, this.constructor)
89
}
10+
911
this.name = 'HttpError'
1012
this.code = code
11-
this.headers = headers
1213
}
1314
}

0 commit comments

Comments
 (0)