You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/framework-conventions/entry.server.tsx.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,9 +145,11 @@ _Note that you generally want to avoid logging when the request was aborted, sin
145
145
146
146
**Streaming Rendering Errors**
147
147
148
-
When you are streaming your HTML responses via [`renderToReadableStream`][rendertoreadablestream], your own `handleError` implementation will only handle errors encountered during the initial shell render. If you encounter a rendering error during subsequent streamed rendering you will need to handle these errors manually since the React Router server has already sent the Response by that point. You can handle these errors in the `onError` callback function.
148
+
When you are streaming your HTML responses via [`renderToPipeableStream`][rendertopipeablestream] or [`renderToReadableStream`][rendertoreadablestream], your own `handleError` implementation will only handle errors encountered during the initial shell render. If you encounter a rendering error during subsequent streamed rendering you will need to handle these errors manually since the React Router server has already sent the Response by that point.
149
149
150
-
For an example, please refer to the default [`entry.server.tsx`][streaming-entry-server].
150
+
For `renderToPipeableStream`, you can handle these errors in the `onError` callback function. You will need to toggle a boolean in `onShellReady` so you know if the error was a shell rendering error (and can be ignored) or an async
151
+
152
+
For an example, please refer to the default [`entry.server.tsx`][node-streaming-entry-server] for Node.
151
153
152
154
**Thrown Responses**
153
155
@@ -158,5 +160,5 @@ Note that this does not handle thrown `Response` instances from your `loader`/`a
0 commit comments