Solid-Query: Error isn't being set when fetching via SSR
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 50.3k
- Forks
- 4.2k
- Avg merge
- 18h 25m
- Merged PRs (30d)
- 200
Description
Describe the bug
so having this:
const link = getContactLink(
() => ({ id: params.id }),
() => ({
deferStream: true,
})
);
which basically calls createQuery(...).
this function throws an error, therefore link.data is null so i can't render anything
yet, link.error is always null, i can't render the error and i can't render the data (because no data was returned)
if i remove deferStream then the errors gets printed to the console but still, link.error doesn't return anything.
Your minimal, reproducible example
n/a
Steps to reproduce
Create a query function that has deferStream and runs on SolidStart SSR
Make it throw an error
Expected behavior
n/a
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
Any OS
Tanstack Query adapter
None
TanStack Query version
tanstack/solid-query 5.60.5
TypeScript version
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the SolidStart SSR case described around getContactLink, createQuery, and deferStream using the reported tanstack/solid-query 5.60.5 setup. Trace how the thrown error reaches link.data and link.error during SSR, then verify that the error is exposed through link.error while the existing data behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100