connectrpc / connect-swift

The Swift implementation of Connect: Protobuf RPC that works.
https://connectrpc.com/docs/swift/getting-started
Apache License 2.0
98 stars 20 forks source link

Replace hardcoded status code integers with `URLError` #238

Closed rebello95 closed 9 months ago

rebello95 commented 9 months ago

These were changed from CFNetworkErrors to hardcoded values in https://github.com/connectrpc/connect-swift/pull/227 to remove the CFNetwork import in order to support watchOS.

As an alternative, we can use URLError values and keep them strongly typed. The replacements are the same except for CFNetworkErrors.cfurlErrorUnknown.rawValue which will still be correctly mapped to .unknown via the ...100 case.

Screenshot 2024-01-20 at 10 07 47 AM