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

Function makeAppropriateNetworkError

deps/undici/undici.js:12313–12316  ·  view source on GitHub ↗
(fetchParams, err = null)

Source from the content-addressed store, hash-verified

12311 }
12312 __name(filterResponse, "filterResponse");
12313 function makeAppropriateNetworkError(fetchParams, err = null) {
12314 assert(isCancelled(fetchParams));
12315 return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err }));
12316 }
12317 __name(makeAppropriateNetworkError, "makeAppropriateNetworkError");
12318 function initializeResponse(response, init, body) {
12319 if (init.status !== null && (init.status < 200 || init.status > 599)) {

Callers 3

schemeFetchFunction · 0.70
httpNetworkOrCacheFetchFunction · 0.70
httpNetworkFetchFunction · 0.70

Calls 5

assignMethod · 0.80
isCancelledFunction · 0.70
isAbortedFunction · 0.70
makeNetworkErrorFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…