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

Function makeNetworkError

deps/undici/undici.js:12246–12254  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

12244 }
12245 __name(makeResponse, "makeResponse");
12246 function makeNetworkError(reason) {
12247 const isError = isErrorLike(reason);
12248 return makeResponse({
12249 type: "error",
12250 status: 0,
12251 error: isError ? reason : new Error(reason ? String(reason) : reason),
12252 aborted: reason && reason.name === "AbortError"
12253 });
12254 }
12255 __name(makeNetworkError, "makeNetworkError");
12256 function isNetworkError(response) {
12257 return (

Callers 8

errorMethod · 0.70
mainFetchFunction · 0.70
schemeFetchFunction · 0.70
httpFetchFunction · 0.70
httpRedirectFetchFunction · 0.70
httpNetworkOrCacheFetchFunction · 0.70
httpNetworkFetchFunction · 0.70

Calls 3

StringClass · 0.85
isErrorLikeFunction · 0.70
makeResponseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…