( request: Request, shellComplete: boolean, )
| 4896 | } |
| 4897 | |
| 4898 | function safelyEmitEarlyPreloads( |
| 4899 | request: Request, |
| 4900 | shellComplete: boolean, |
| 4901 | ): void { |
| 4902 | try { |
| 4903 | emitEarlyPreloads( |
| 4904 | request.renderState, |
| 4905 | request.resumableState, |
| 4906 | shellComplete, |
| 4907 | ); |
| 4908 | } catch (error) { |
| 4909 | // We assume preloads are optimistic and thus non-fatal if errored. |
| 4910 | const errorInfo: ThrownInfo = {}; |
| 4911 | logRecoverableError(request, error, errorInfo, null); |
| 4912 | } |
| 4913 | } |
| 4914 | |
| 4915 | // I extracted this function out because we want to ensure we consistently emit preloads before |
| 4916 | // transitioning to the next request stage and this transition can happen in multiple places in this |
no test coverage detected