Handle transient failures (DNS, certificate, etc.) and retry after n hours.

This commit is contained in:
Brent Simmons committed 2026-05-29 11:12:20 -07:00
1 parent 3af0d7cf2f
commit b919782eb3
3 files changed
+45 -16

No files matched your search

@@ -148,7 +148,9 @@ nonisolated private extension HTMLMetadataDownloader {
activityLog.didFail(.htmlMetadataDownloader, kind: kind, error: statusError)
} catch {
// Download failed — try returning stale cached data.
// Pre-response failure (DNS, TLS, network). Record so we back off
// across launches, then try returning stale cached data.
await HTMLMetadataDatabase.shared.noteTransientFailure(url: url)
await returnStaleCacheIfAvailable(url)
activityLog.didFail(.htmlMetadataDownloader, kind: kind, error: error)