Commit c956170
Only dehydrate successful queries to prevent unhandled rejections (#8608)
The custom shouldDehydrateQuery callback was overriding TanStack Query's
default status check, allowing pending queries to be dehydrated. When a
pending query's promise later rejected (e.g. network error), the
dehydration catch handler would create an unhandled Error("redacted"),
which Sentry captured.
Add query.state.status === 'success' check to match the default behavior.
Closes #8605
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 61d3085 commit c956170
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| |||
0 commit comments