| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
|
View your CI Pipeline Execution ↗ for commit 07eca19
☁️ Nx Cloud last updated this comment at 2026-08-28 07:03:38 UTC |
Sorry, something went wrong.
🚀 Changeset Version Preview1 package(s) bumped directly, 3 bumped as dependents. 🟨 Minor bumps
|
Sorry, something went wrong.
Sorry, something went wrong.
size-limit report 📦
|
Sorry, something went wrong.
…hen throwOnError is set
| Back | FazBrowse Home | New Git URL |
🎯 Changes
createQuery/createInfiniteQuery never threw errors from the render path when throwOnError was set — the throwOnError option was accepted (typed) but had no runtime effect for these hooks. This contradicts the documented behavior (docs/framework/svelte/quick-start.md): "Set throwOnError option to true to make sure errors are thrown to the <svelte:boundary> component."
Added a dedicated $effect in createBaseQuery.svelte.ts (shared by both createQuery and createInfiniteQuery) that throws when shouldThrowError returns true. The throw must happen from inside a Svelte reaction — verified experimentally that throwing from the subscribe callback (which runs through notifyManager's batching, outside any active Svelte reaction) never reaches <svelte:boundary> and instead becomes an unhandled error.
The reaction reads observer.getCurrentResult() (untracked) rather than the query result object returned to consumers, gated behind a separate resultVersion counter. Reading query.isError/query.isFetching directly would mark them tracked on the trackResult proxy the first time an error occurs, permanently widening notifyOnChangeProps for every consumer of that query from then on — verified with a regression test that reproduces the pollution (1 vs 4 re-runs) before/after this change.
This still notifies reliably because queryObserver.ts force-adds 'error' to the notified props whenever options.throwOnError is set, regardless of what any consumer has read. This is a load-bearing dependency on that query-core internal — flagging it here for visibility.
createQueries.svelte.ts is out of scope for this PR — same defect, separate change.
Also out of scope: the QueryErrorResetBoundary/errorResetBoundary reset machinery react-query has (retryOnMount suppression while unreset). Svelte 5's <svelte:boundary> gives a reset() callback to the failed snippet directly, a different primitive — mapping React's reset model onto it is a separate design decision.
✅ Checklist
🚀 Release Impact