diff --git a/Tusker/Screens/Timeline/TimelineViewController.swift b/Tusker/Screens/Timeline/TimelineViewController.swift index a4742f27..ef0212b9 100644 --- a/Tusker/Screens/Timeline/TimelineViewController.swift +++ b/Tusker/Screens/Timeline/TimelineViewController.swift @@ -384,6 +384,11 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro _ = try await mastodonController.run(req) } catch { stateRestorationLogger.error("TimelineViewController: failed to update timeline marker: \(String(describing: error))") + + if let error = error as? Client.Error, + case .networkError(_) = error.type { + return + } let event = Event(error: error) event.message = SentryMessage(formatted: "Failed to update timeline marker: \(String(describing: error))") SentrySDK.capture(event: event) @@ -577,6 +582,11 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro return true } catch { stateRestorationLogger.error("TimelineViewController: failed to load from timeline marker: \(String(describing: error))") + + if let error = error as? Client.Error, + case .networkError(_) = error.type { + return false + } let event = Event(error: error) event.message = SentryMessage(formatted: "Failed to load from timeline marker: \(String(describing: error))") SentrySDK.capture(event: event)