MCPcopy
hub / github.com/nodejs/undici / onResponseData

Method onResponseData

lib/interceptor/response-error.js:46–52  ·  view source on GitHub ↗
(controller, chunk)

Source from the content-addressed store, hash-verified

44 }
45
46 onResponseData (controller, chunk) {
47 if (this.#statusCode < 400) {
48 return super.onResponseData(controller, chunk)
49 }
50
51 this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ''
52 }
53
54 onResponseEnd (controller, trailers) {
55 if (this.#statusCode >= 400) {

Callers

nothing calls this directly

Calls 1

onResponseDataMethod · 0.65

Tested by

no test coverage detected