Error handling with SSR and suspense queries on tanstack start
Hi, I'm using (for the first time, with no experience with this framework) Tanstack Start, paired with Tanstack Query.
I followed the official example I found in tanstack start documentation to properly configure and use query in an SSR enviroment.
When the queries correctly returns data there are no problems.
However if the query fails (in my case, the rest API I'm calling can throw an error) while running on server I have an hydration error:
A query that was dehydrated as pending ended up rejecting.
It seems like the error is not properly handled with this SSR streaming setup.
I've checked all the documentation but I'm not able to find a proper solution to this.
This is my current code (not complete, only relevant parts):
router.tsx
testComponent.tsx
1 Reply
ratty-blush•4w ago
Were you able to fix this? I am also running into this