Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace hardcoded status code integers with URLError #238

Merged
merged 1 commit into from Jan 31, 2024
Merged

Conversation

rebello95
Copy link
Contributor

These were changed from CFNetworkErrors to hardcoded values in #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

These were changed from `CFNetworkErrors` to hardcoded values in #227 to remove the `CFNetwork` import in order to support watchOS.

As an alternative, we can use `URLError` values.
@rebello95 rebello95 merged commit ee84e5e into main Jan 31, 2024
14 checks passed
@rebello95 rebello95 deleted the urlerror-codes branch January 31, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants