Browse Source
When offline and navigating to an unvisited route, the ErrorBoundary displayed a generic "Something went wrong" page instead of the friendly offline/crunk-load error message. This happened because: 1. isChunkLoadError could miss errors when React wraps them or the error name doesn't exactly match — now also checks error.stack and adds a case-insensitive "chunkloaderror" pattern 2. When offline, ANY render error is overwhelmingly likely a chunk load failure — new isNetworkRelatedError() treats offline as network-related 3. The subtitle defaultMessage was wrong: it used isOffline instead of combining both networkRelated and isOffline dimensions 4. handleRetry only reloaded for isChunkLoadError — now also reloads when offline (resetting state can't re-fetch the chunk) 5. Auto-reloads the page when network comes back online during an error Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>pull/11756/head
1 changed files with 45 additions and 17 deletions
Loading…
Reference in new issue