Skip to content

Commit

Permalink
Update response-error.js
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
mertcanaltin and ronag committed Jun 21, 2024
1 parent b0700c3 commit 821ea1d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/interceptor/response-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ class Handler extends DecoratorHandler {

const err = new ResponseError('Response Error', this.#statusCode, this.#headers, this.#body)

if (this.opts.error !== false || (Array.isArray(this.opts.statusCodes) && this.opts.statusCodes.includes(this.#statusCode))) {
this.#handler.onError(err)
} else {
this.#handler.onComplete(rawTrailers)
}
this.#handler.onError(err)
} else {
this.#handler.onComplete(rawTrailers)
}
Expand Down

0 comments on commit 821ea1d

Please sign in to comment.