Make BugReportService reportUrl optional (#4195)

This commit is contained in:
Nicolas Buquet
2025-06-18 13:35:04 +02:00
committed by Doug
parent 8b53ff2f37
commit dd20823240
2 changed files with 2 additions and 2 deletions
@@ -140,7 +140,7 @@ class BugReportService: NSObject, BugReportServiceProtocol {
decoder.keyDecodingStrategy = .convertFromSnakeCase decoder.keyDecodingStrategy = .convertFromSnakeCase
let uploadResponse = try decoder.decode(SubmitBugReportResponse.self, from: data) let uploadResponse = try decoder.decode(SubmitBugReportResponse.self, from: data)
if !uploadResponse.reportUrl.isEmpty { if !(uploadResponse.reportUrl?.isEmpty ?? false) {
lastCrashEventID = nil lastCrashEventID = nil
} }
@@ -22,7 +22,7 @@ struct BugReport: Equatable {
} }
struct SubmitBugReportResponse: Decodable { struct SubmitBugReportResponse: Decodable {
var reportUrl: String var reportUrl: String?
} }
enum BugReportServiceError: LocalizedError { enum BugReportServiceError: LocalizedError {