Improved bug report error handling (#1018)

* Improve rageshake error handling.

* Add a max file size and exclude older files one the limit is hit.

* Zip log files as smaller chunks.
This commit is contained in:
Doug
2023-06-06 09:24:01 +01:00
committed by GitHub
parent 4e926c3334
commit ea4aa943e0
11 changed files with 279 additions and 100 deletions
@@ -64,7 +64,7 @@ class BugReportViewModelTests: XCTestCase {
let mockService = BugReportServiceMock()
mockService.submitBugReportProgressListenerClosure = { _, _ in
await Task.yield()
return SubmitBugReportResponse(reportUrl: "https://test.test")
return .success(SubmitBugReportResponse(reportUrl: "https://test.test"))
}
let viewModel = BugReportScreenViewModel(bugReportService: mockService,
userID: "@mock.client.com",
@@ -90,7 +90,7 @@ class BugReportViewModelTests: XCTestCase {
func testSendReportWithError() async throws {
let mockService = BugReportServiceMock()
mockService.submitBugReportProgressListenerClosure = { _, _ in
throw TestError.testError
.failure(.uploadFailure(TestError.testError))
}
let viewModel = BugReportScreenViewModel(bugReportService: mockService,
userID: "@mock.client.com",