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

Function onClientRequestError

lib/internal/inspector/network_undici.js:97–108  ·  view source on GitHub ↗

* When a client request errors, emit Network.loadingFailed event. * https://chromedevtools.github.io/devtools-protocol/1-3/Network/#event-loadingFailed * @param {{ request: undici.Request, error: any }} event

({ request, error })

Source from the content-addressed store, hash-verified

95 * @param {{ request: undici.Request, error: any }} event
96 */
97function onClientRequestError({ request, error }) {
98 if (typeof request[kInspectorRequestId] !== 'string') {
99 return;
100 }
101 Network.loadingFailed({
102 requestId: request[kInspectorRequestId],
103 timestamp: getMonotonicTime(),
104 // TODO(legendecas): distinguish between `undici.request` and `undici.fetch`.
105 type: kResourceType.Fetch,
106 errorText: error.message,
107 });
108}
109
110/**
111 * When a chunk of the request body is being sent, cache it until `getRequestPostData` request.

Callers

nothing calls this directly

Calls 1

getMonotonicTimeFunction · 0.85

Tested by

no test coverage detected