(err)
| 58269 | onData(chunk) { |
| 58270 | this.start += chunk.length; |
| 58271 | return this.handler.onData(chunk); |
| 58272 | } |
| 58273 | onComplete(rawTrailers) { |
| 58274 | this.retryCount = 0; |
| 58275 | return this.handler.onComplete(rawTrailers); |
| 58276 | } |
| 58277 | onError(err) { |
| 58278 | if (this.aborted || isDisturbed(this.opts.body)) { |
| 58279 | return this.handler.onError(err); |
| 58280 | } |
| 58281 | this.retryOpts.retry( |
| 58282 | err, |
| 58283 | { |
| 58284 | state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, |
| 58285 | opts: { retryOptions: this.retryOpts, ...this.opts } |
| 58286 | }, |
| 58287 | onRetry.bind(this) |
| 58288 | ); |
| 58289 | function onRetry(err2) { |
| 58290 | if (err2 != null || this.aborted || isDisturbed(this.opts.body)) { |
| 58291 | return this.handler.onError(err2); |
| 58292 | } |
| 58293 | if (this.start !== 0) { |
| 58294 | this.opts = { |
| 58295 | ...this.opts, |
| 58296 | headers: { |
| 58297 | ...this.opts.headers, |
| 58298 | range: `bytes=${this.start}-${this.end ?? ""}` |
| 58299 | } |
| 58300 | }; |
| 58301 | } |
| 58302 | try { |
| 58303 | this.dispatch(this.opts, this); |
| 58304 | } catch (err3) { |
| 58305 | this.handler.onError(err3); |
nothing calls this directly
no test coverage detected