Cleanup proxy errors

- proxy errors have been getting repetitive and not particularly useful
- differentiate between sdk and client errors and keep what provides value
- add error logs everywhere a failure occurs
This commit is contained in:
Stefan Ceriu
2024-04-04 10:17:55 +03:00
committed by Stefan Ceriu
parent 7aba0216bc
commit 77e28df1a8
16 changed files with 189 additions and 211 deletions

View File

@@ -105,7 +105,7 @@ class HomeScreenViewModelTests: XCTestCase {
func testLeaveRoomError() async throws {
let mockRoomId = "1"
let room: RoomProxyMock = .init(with: .init(id: mockRoomId, name: "Some room"))
room.leaveRoomClosure = { .failure(.failedLeavingRoom) }
room.leaveRoomClosure = { .failure(.sdkError(ClientProxyMockError.generic)) }
clientProxy.roomForIdentifierClosure = { _ in room }