-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Flesh out URLError information upon URLSessionTask cancellation #2825
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
Conversation
There are 6 other uses of the |
The testcase is ok, I ran it under However the test failed on both Linux and macOS. Note that currently the Note in this case it looks like |
I thought it ran in the TestFoundation target of the Xcode project, but maybe it didn't. (I should have tried to crash the test to make sure!) Building on Linux failed yesterday, and didn't have enough time to fix that so I crossed my fingers and submitted it. I'll try again. |
@spevans I haven't had time to solve my Linux build, but now I've gotten the test to properly run from Xcode. |
I think we should fix the
|
I wasn't sure what This being said, there are other things with URLError: none of the properties added in iOS 13 are on it yet. Obviously they're for either darwin-specific or not-yet-supported things, but shouldn't they be there, returning |
Yes I think a separate PR to fix up the properties in
can be changed to a It just requires adding some tests constructing |
@swift-ci test |
I just tested it locally on Linux with the |
@swift-ci test |
Thanks! |
The
URLError
received uponURLSessionTask
cancellation by aURLSessionTaskDelegate
or completion handler has a blankuserInfo
dictionary. This is an inconsistency when compared with macOS's Foundation and it makes actual error handling harder than it could be.This PR fills it out to match the fields filled out by macOS Foundation.
I previously reported this as https://bugs.swift.org/browse/SR-13017, and I believe this fixes that (if a fix is even desirable, that is.)