Skip to content

Commit cbbf035

Browse files
committed
fix: include cause in toJSON
1 parent 3f7b96d commit cbbf035

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/baseClasses/HttpError.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ HttpError.prototype.toJSON = function toJSON() {
159159

160160
return {
161161
code: self.body.code,
162-
message: message
162+
message: message,
163+
cause: self.cause
163164
};
164165
};
165166

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"mkdirp": "^0.5.1",
4545
"mocha": "^6.2.2",
4646
"nyc": "^14.1.1",
47-
"restify": "^8.5.0",
48-
"restify-clients": "^2.6.7",
47+
"restify": "^11.1.0",
48+
"restify-clients": "^4.2.0",
4949
"unleash": "^2.0.1"
5050
},
5151
"optionalDependencies": {

0 commit comments

Comments
 (0)