( request: Request, error: mixed, errorInfo: ThrownInfo, debugTask: null | ConsoleTask, )
| 1243 | } |
| 1244 | |
| 1245 | function fatalError( |
| 1246 | request: Request, |
| 1247 | error: mixed, |
| 1248 | errorInfo: ThrownInfo, |
| 1249 | debugTask: null | ConsoleTask, |
| 1250 | ): void { |
| 1251 | // This is called outside error handling code such as if the root errors outside |
| 1252 | // a suspense boundary or if the root suspense boundary's fallback errors. |
| 1253 | // It's also called if React itself or its host configs errors. |
| 1254 | const onShellError = request.onShellError; |
| 1255 | const onFatalError = request.onFatalError; |
| 1256 | if (__DEV__ && debugTask) { |
| 1257 | debugTask.run(onShellError.bind(null, error)); |
| 1258 | debugTask.run(onFatalError.bind(null, error)); |
| 1259 | } else { |
| 1260 | onShellError(error); |
| 1261 | onFatalError(error); |
| 1262 | } |
| 1263 | if (request.destination !== null) { |
| 1264 | request.status = CLOSED; |
| 1265 | closeWithError(request.destination, error); |
| 1266 | } else { |
| 1267 | request.status = CLOSING; |
| 1268 | request.fatalError = error; |
| 1269 | } |
| 1270 | } |
| 1271 | |
| 1272 | function renderSuspenseBoundary( |
| 1273 | request: Request, |
no test coverage detected