-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw-on-server-default-fix #7952
base: main
Are you sure you want to change the base?
Conversation
…t SSR can render the page the same way the client will rather than showing the error boundary fallback
…t SSR can render the page the same way the client will rather than showing the error boundary fallback
…t SSR can render the page the same way the client will rather than showing the error boundary fallback
it's on purpose that we also throw errors on the server because what react will then do during SSR is render the Suspense fallback (not the error) and retry automatically on the client. The error boundary will only be shown once that fails, too. |
@TkDodo My code change was not for react, but for solid (hence my changes are in packages/solid-query/src/createBaseQuery.ts). What I am seeing is the server returns a page with the error boundary displayed. With the changes from this PR, the server sends exactly what I expected and still does the retry as you mentioned. I would prefer the server to not send with the error boundary and reserve the error boundary for unexpected errors. In my scenario, a fetch call is failing. I am manually handling this error with proper state management so it makes sense to me that the sever respects what my code is doing and serves the page just like the client would. |
right, maybe solid is different to react here. @ardeora FYI |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit cfe8a00. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
commit: @tanstack/angular-query-devtools-experimental
@tanstack/angular-query-experimental
@tanstack/eslint-plugin-query
@tanstack/query-async-storage-persister
@tanstack/query-broadcast-client-experimental
@tanstack/query-core
@tanstack/query-devtools
@tanstack/query-persist-client-core
@tanstack/query-sync-storage-persister
@tanstack/react-query
@tanstack/react-query-devtools
@tanstack/react-query-next-experimental
@tanstack/react-query-persist-client
@tanstack/solid-query
@tanstack/solid-query-devtools
@tanstack/solid-query-persist-client
@tanstack/svelte-query
@tanstack/svelte-query-devtools
@tanstack/svelte-query-persist-client
@tanstack/vue-query
@tanstack/vue-query-devtools
More templates
|
fix: stop defaulting to throwOnError=true when isServer===true so that SSR can render the page the same way the client will rather than showing the error boundary fallback