MCPcopy Index your code
hub / github.com/nodejs/node / onResponseError

Function onResponseError

deps/undici/undici.js:14468–14479  ·  view source on GitHub ↗
(_controller, error)

Source from the content-addressed store, hash-verified

14466 this.body?.push(null);
14467 },
14468 onResponseError(_controller, error) {
14469 if (this.abort) {
14470 fetchParams.controller.off("terminated", this.abort);
14471 }
14472 if (request.mode === "websocket" && allowH2 !== false && error?.code === "UND_ERR_INFO" && error?.message === "HTTP/2: Extended CONNECT protocol not supported by server") {
14473 resolve(dispatchWithProtocolPreference(body2, false));
14474 return;
14475 }
14476 this.body?.destroy(error);
14477 fetchParams.controller.terminate(error);
14478 reject(error);
14479 },
14480 onRequestUpgrade(controller, status, headers, socket) {
14481 if (socket.session != null && status !== 200 || socket.session == null && status !== 101) {
14482 return false;

Callers

nothing calls this directly

Calls 6

resolveFunction · 0.50
rejectFunction · 0.50
offMethod · 0.45
destroyMethod · 0.45
terminateMethod · 0.45

Tested by

no test coverage detected