diff --git a/ElementX/Sources/Screens/SessionVerificationScreen/SessionVerificationScreenViewModel.swift b/ElementX/Sources/Screens/SessionVerificationScreen/SessionVerificationScreenViewModel.swift index d804d5161c..6e12abd945 100644 --- a/ElementX/Sources/Screens/SessionVerificationScreen/SessionVerificationScreenViewModel.swift +++ b/ElementX/Sources/Screens/SessionVerificationScreen/SessionVerificationScreenViewModel.swift @@ -109,7 +109,11 @@ class SessionVerificationScreenViewModel: SessionVerificationViewModelType, Sess case (_, _, .verified): // Dismiss the success screen automatically. Task { - try await Task.sleep(for: .seconds(2)) + do { + try await Task.sleep(for: .seconds(2)) + } catch { + MXLog.error(error.localizedDescription) + } self.callback?(.finished) } default: diff --git a/ElementX/Sources/Services/Timeline/TimelineController/MockRoomTimelineController.swift b/ElementX/Sources/Services/Timeline/TimelineController/MockRoomTimelineController.swift index 46eae5a687..6b5a52ecb9 100644 --- a/ElementX/Sources/Services/Timeline/TimelineController/MockRoomTimelineController.swift +++ b/ElementX/Sources/Services/Timeline/TimelineController/MockRoomTimelineController.swift @@ -81,7 +81,13 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol { let client = try UITestsSignalling.Client(mode: .app) signalCancellable = client.signals.sink { [weak self] signal in - Task { try await self?.handleSignal(signal) } + Task { + do { + try await self?.handleSignal(signal) + } catch { + MXLog.error(error.localizedDescription) + } + } } self.client = client