Open lo1tuma opened 2 months ago
Please attach a valid minimal reproduction showing off the issue in question. You can fork our Stackblitz starter to make the setup process easier - https://stackblitz.com/github/tanstack/router/tree/main/examples/react/quickstart-file-based
This issue only happens during server-side-rendering. So I’ve used basic-ssr-file-based as an example. See https://stackblitz.com/edit/github-5vsdzx
What has been changed:
notFound()
defaultErrorComponent
which also logs the props to the consolenotFoundComponent
which use <Await>
to wait for a promise that always rejectsSteps to reproduce:
npm install && npm run dev
Client Server: http://localhost:3000
{
data: { data: { data: [Object], __isServerError: true } },
__isServerError: true
}
Error: 💣
An <Await>
with a Promise
is not something typically found in a notFoundComponent
.
@lo1tuma what's your expectation as to what's supposed to happen here?
@tannerlinsley what's Start's desired expectation here?
An
<Await>
with aPromise
is not something typically found in anotFoundComponent
.
See also this discussion I’m basically looking for a unified way to load data in a notFoundComponent
.
@lo1tuma what's your expectation as to what's supposed to happen here?
My expectation would be that the error is getting caught and instead of rendering the notFoundComponent
the errorComponent
should get rendered.
Which project does this relate to?
Router
Describe the bug
I‘m using
<Await>
to fetch some data in anotFoundComponent
. When usingrenderToPipeableStream()
I can see the following object has been thrown and not caught by an error boundary:Your Example Website or App
https://stackblitz.com/edit/github-yk78pg-wpq5bb
Steps to Reproduce the Bug or Issue
npm i
npm run compile
node dist/main.js
Expected behavior
I would expect:
defaultErrorComponent
being invoked with the rejected promise from<Await />
Error
instead of the serialized server error objectScreenshots or Videos
No response
Platform
1.52.4
Additional context
No response