-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Describe the bug
Resetting error boundary doesn't re-fetch the query if an error was caused by being Offline (and retry=false). The fallback UI is still displayed after user is already Online and Reset button is pressed.
This is probably somewhat related to #2179.
To Reproduce
- Go to https://stmgh.csb.app/
- Open Chrome Dev Tools, disable cache, set Throttle to Offline (or disable All Network Adapters on your PC. Disabling cache is needed anyway)
- Click on refetch
- Fallback UI is displayed
- Set Throttle to 'No Throttle' in Dev. tools.
- Press Reset.
- Fallback UI is still displayed, according to Dev Tools no API request is being actually sent.
Expected behavior
Fallback UI should immediately disappear, API request should be sent, 'loading...' should be shown, which should change to displaying actual data once the API call succeeds.
Or as discussed in #2179 maybe the query shouldn't switch to error or fetching state at all, if the user is currently offline.
This is probably just another scenario to consider when deciding about #2179.
eucaos
Metadata
Metadata
Assignees
Labels
No labels