Closed michaelnisi closed 5 years ago
We have to check error before passing it to updateComplete: ((_ newData: Bool, _ error: Error?) -> Void)?)
, because the error might have been bubbled up the dependency chain and thus not be a critical error.
I was worried about UIBackgroundFetchResult
, but AppDelegate
looks at a combination of newData
and error
to produce the result, so, it’s fine to pass non-critical errors.
Found in the user logs, after updating the queue :
https://github.com/michaelnisi/feedkit/blob/c4243f19433c40b7b02a490c8c39b5b92499983e/FeedKit/user/UserLibrary.swift#L248