Skip to content

Commit

Permalink
fix: instantiation of ResponseError, pass headers and data correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Aug 17, 2024
1 parent 1422997 commit 1514b28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/interceptor/response-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ class Handler extends DecoratorHandler {
const stackTraceLimit = Error.stackTraceLimit
Error.stackTraceLimit = 0
try {
err = new ResponseError('Response Error', this.#statusCode, this.#headers, this.#body)
err = new ResponseError('Response Error', this.#statusCode, {
data: this.#body,
headers: this.#headers
})
} finally {
Error.stackTraceLimit = stackTraceLimit
}
Expand Down

0 comments on commit 1514b28

Please sign in to comment.