Lines Matching refs:error

98   abort (error) {
107 // 3. Set error to fallbackError if it is not given.
108 if (!error) {
109 error = new DOMException('The operation was aborted.', 'AbortError')
112 // 4. Let serializedError be StructuredSerialize(error).
117 this.serializedAbortReason = error
119 this.connection?.destroy(error)
120 this.emit('terminated', error)
224 // 3. If response is a network error, then reject p with a TypeError
226 if (response.type === 'error') {
228 Object.assign(new TypeError('fetch failed'), { cause: response.error })
259 // 1. If response is an aborted network error, then return.
260 if (response.type === 'error' && response.aborted) {
328 function abortFetch (p, request, responseObject, error) {
330 // which would give us an undefined error to reject with.
332 if (!error) {
333 error = new DOMException('The operation was aborted.', 'AbortError')
336 // 1. Reject promise with error.
337 p.reject(error)
340 // body with error.
342 request.body.stream.cancel(error).catch((err) => {
359 // 5. If response’s body is not null and is readable, then error response’s
360 // body with error.
362 response.body.stream.cancel(error).catch((err) => {
536 // not local, then set response to a network error.
549 // Security Policy returns blocked, then set response to a network error.
605 // 1. Return a network error.
612 // error.
628 // Return a network error.
639 // 3. If corsWithPreflightResponse is a network error, then clear cache
658 // 13. If response is not a network error and response is not a filtered
688 // 14. Let internalResponse be response, if response is a network error,
705 // 17. If response is not a network error and any of the following returns
716 // to a network error.
726 // 19. If response is not a network error and either request’s method is
743 // and a network error.
750 processBodyError(response.error)
784 // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.
801 // Otherwise, return a network error.
821 // object is not a Blob object, then return a network error.
859 // network error.
880 // When in doubt, return a network error.
911 // 1. If response is a network error, then:
912 if (response.type === 'error') {
1035 // for request and response returns failure, then return a network error.
1053 // and actualResponse returns blocked, then return a network error.
1077 if (request.redirect === 'error') {
1078 // Set response to a network error.
1129 // 5. If locationURL is failure, then return a network error.
1134 // error.
1139 // 7. If request’s redirect count is 20, then return a network error.
1149 // a network error.
1159 // credentials, then return a network error.
1170 // and request’s body’s source is null, then return a network error.
1277 // "error", then set httpFetchParams to fetchParams and httpRequest to
1279 if (request.window === 'no-window' && request.redirect === 'error') {
1448 // 9. If aborted, then return the appropriate network error for fetchParams.
1454 // network error.
1515 // 1. If request’s window is "no-window", then return a network error.
1522 // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.
1548 // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.
1637 // 1. If connection is failure, then return a network error.
1662 // resend request, then instead return a network error.
1678 // error.
1685 // 2. Otherwise, return a network error.
1773 // 2. Return the appropriate network error for fetchParams.
1833 // 2. If response is not a network error and request’s cache mode is
1876 // which might not be an error. https://github.com/nodejs/undici/issues/2009
1927 // 2. If stream is readable, then error stream with the result of
1932 fetchParams.controller.controller.error(
1937 // 3. Otherwise, if stream is readable, error stream with a TypeError.
1939 fetchParams.controller.controller.error(new TypeError('terminated', {
2064 : this.body.on('error', () => {})
2103 onError (error) {
2108 this.body?.destroy(error)
2110 fetchParams.controller.terminate(error)
2112 reject(error)