Which project does this relate to?
Start
Describe the bug
In my app I have a two providers which require a fetch from an API. During a release/startup the API might not have fully booted up yet causing this fetch to fail. The providers are defined in the _root.tsx before .
The result is that the server returns a JSON response:
{"status":500,"unhandled":true,"message":"HTTPError"}
I would have expected at least one error page to show (either from __root or the defaultErrorComponent from the router). No amount of error boundaries seem to help.
The biggest problem is that, because it can't be handled gracefully, the query can't be refetched and as such the server keeps throwing an error 500 even if the API has become available.
Your Example Website or App
https://github.com/Da-Teach/start-basic-react-query-error
Steps to Reproduce the Bug or Issue
The example git repo will immediately throw the error.
Expected behavior
I expect to see an error page but seeing a JSON error instead.
Screenshots or Videos
No response
Platform
Browser doesn't matter, nor platform.
"@tanstack/react-query": "^5.97.0",
"@tanstack/react-query-devtools": "^5.97.0",
"@tanstack/react-router": "^1.168.10",
"@tanstack/react-router-devtools": "^1.166.11",
"@tanstack/react-router-ssr-query": "^1.166.10",
"@tanstack/react-start": "^1.167.16",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.1"
Additional context
No response
Which project does this relate to?
Start
Describe the bug
In my app I have a two providers which require a fetch from an API. During a release/startup the API might not have fully booted up yet causing this fetch to fail. The providers are defined in the _root.tsx before .
The result is that the server returns a JSON response:
{"status":500,"unhandled":true,"message":"HTTPError"}
I would have expected at least one error page to show (either from __root or the defaultErrorComponent from the router). No amount of error boundaries seem to help.
The biggest problem is that, because it can't be handled gracefully, the query can't be refetched and as such the server keeps throwing an error 500 even if the API has become available.
Your Example Website or App
https://github.com/Da-Teach/start-basic-react-query-error
Steps to Reproduce the Bug or Issue
The example git repo will immediately throw the error.
Expected behavior
I expect to see an error page but seeing a JSON error instead.
Screenshots or Videos
No response
Platform
Browser doesn't matter, nor platform.
"@tanstack/react-query": "^5.97.0",
"@tanstack/react-query-devtools": "^5.97.0",
"@tanstack/react-router": "^1.168.10",
"@tanstack/react-router-devtools": "^1.166.11",
"@tanstack/react-router-ssr-query": "^1.166.10",
"@tanstack/react-start": "^1.167.16",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.1"
Additional context
No response