TanStack
OSS
query
Sign in / Sign up
Open main menu
query
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
main
fccef797 fix(query-core): ensure query refetches on mount/retry when status is error (#9728) (#9927) * fix(query-core): ensure query refetches on mount/retry when status is error (#9728) * fix: mark queries as invalidated on background errors instead of checking error status - Remove error status check in shouldFetchOn - Set isInvalidated: true in reducer when background error occurs (only if data exists) - Add tests for staleTime: 'static' and non-static queries with background errors This approach centralizes stale logic in isStale/isStaleByTime and prevents regression where staleTime: 'static' queries would incorrectly refetch on window focus after a background error. * refactor: simplify isInvalidated logic in error case Set isInvalidated: true unconditionally since queries with no data are always considered stale per isStaleByTime logic. * Apply suggestion from @TkDodo * Apply suggestions from code review * fix: eslint * fix: disable retry in background error tests to prevent timeout The tests were timing out because when refetch() throws an error, the default retry mechanism (3 retries with exponential backoff) was being triggered. With fake timers, the retry delays weren't being advanced, causing the tests to hang. Adding retry: false to both tests disables retries and allows them to complete immediately after the error, which is appropriate for these tests that specifically check background error behavior. --------- Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2 months ago
by xiangnuans
x
Succeeded
9927
909a5044 fix: disable retry in background error tests to prevent timeout The tests were timing out because when refetch() throws an error, the default retry mechanism (3 retries with exponential backoff) was being triggered. With fake timers, the retry delays weren't being advanced, causing the tests to hang. Adding retry: false to both tests disables retries and allows them to complete immediately after the error, which is appropriate for these tests that specifically check background error behavior.
2 months ago
by xiangnuans
x
Previous page
Previous
Next
Next page