Add more specific error messages.

This commit is contained in:
Brent Simmons committed 2026-03-31 18:05:04 -07:00
1 parent bae6dd0190
commit da58db3931
1 file changed
+6 -2
@@ -107,8 +107,12 @@ public enum TransportError: LocalizedError, Sendable {
let msg = NSLocalizedString("HTTP Status: ", comment: "Unexpected error")
return "\(msg) \(status)"
}
default:
return NSLocalizedString("An unknown network error occurred.", comment: "Unknown error")
case .noData:
return NSLocalizedString("No data was returned by the server.", comment: "No data")
case .noURL:
return NSLocalizedString("The URL for the request is missing.", comment: "No URL")
case .suspended:
return NSLocalizedString("The request was not sent because syncing is suspended.", comment: "Suspended")
}
}