forked from shadowfacts/Tusker
Don't report network errors when syncing timeline marker
This commit is contained in:
parent
fb5581ae67
commit
32b8d27949
|
@ -384,6 +384,11 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro
|
||||||
_ = try await mastodonController.run(req)
|
_ = try await mastodonController.run(req)
|
||||||
} catch {
|
} catch {
|
||||||
stateRestorationLogger.error("TimelineViewController: failed to update timeline marker: \(String(describing: error))")
|
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)
|
let event = Event(error: error)
|
||||||
event.message = SentryMessage(formatted: "Failed to update timeline marker: \(String(describing: error))")
|
event.message = SentryMessage(formatted: "Failed to update timeline marker: \(String(describing: error))")
|
||||||
SentrySDK.capture(event: event)
|
SentrySDK.capture(event: event)
|
||||||
|
@ -577,6 +582,11 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro
|
||||||
return true
|
return true
|
||||||
} catch {
|
} catch {
|
||||||
stateRestorationLogger.error("TimelineViewController: failed to load from timeline marker: \(String(describing: error))")
|
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)
|
let event = Event(error: error)
|
||||||
event.message = SentryMessage(formatted: "Failed to load from timeline marker: \(String(describing: error))")
|
event.message = SentryMessage(formatted: "Failed to load from timeline marker: \(String(describing: error))")
|
||||||
SentrySDK.capture(event: event)
|
SentrySDK.capture(event: event)
|
||||||
|
|
Loading…
Reference in New Issue