(request: Request, error: mixed)
| 4016 | } |
| 4017 | |
| 4018 | function fatalError(request: Request, error: mixed): void { |
| 4019 | const onFatalError = request.onFatalError; |
| 4020 | onFatalError(error); |
| 4021 | if (enableTaint) { |
| 4022 | cleanupTaintQueue(request); |
| 4023 | } |
| 4024 | // This is called outside error handling code such as if an error happens in React internals. |
| 4025 | if (request.destination !== null) { |
| 4026 | request.status = CLOSED; |
| 4027 | closeWithError(request.destination, error); |
| 4028 | } else { |
| 4029 | request.status = CLOSING; |
| 4030 | request.fatalError = error; |
| 4031 | } |
| 4032 | const abortReason = new Error( |
| 4033 | 'The render was aborted due to a fatal error.', |
| 4034 | { |
| 4035 | cause: error, |
| 4036 | }, |
| 4037 | ); |
| 4038 | request.cacheController.abort(abortReason); |
| 4039 | } |
| 4040 | |
| 4041 | function emitPostponeChunk( |
| 4042 | request: Request, |
no test coverage detected