(reason)
| 383 | } |
| 384 | |
| 385 | function makeNetworkError (reason) { |
| 386 | const isError = isErrorLike(reason) |
| 387 | return makeResponse({ |
| 388 | type: 'error', |
| 389 | status: 0, |
| 390 | error: isError |
| 391 | ? reason |
| 392 | : new Error(reason ? String(reason) : reason), |
| 393 | aborted: reason && reason.name === 'AbortError' |
| 394 | }) |
| 395 | } |
| 396 | |
| 397 | // @see https://fetch.spec.whatwg.org/#concept-network-error |
| 398 | function isNetworkError (response) { |
no test coverage detected