Hello,
Foundation declares a URLError struct with a comment saying that URLError describes errors in the URL error domain:
/// Describes errors in the URL error domain.
public struct URLError {
/// The type of an error code.
@objc public enum Code : Int {
case unknown
case ...
}
}
In the response of URLSession.dataTask(with url: URL, completionHandler: (Data?, URLResponse?, Error?) ),
casting the Error to a URLError succeeds.
Does URLSession now always return a URLError if an error occurred, or is it only in some cases?
If so, are there plans to update the signatures of the URLSession.dataTask methods to the URLError type?
Thanks!