I was going through the documentation of dataTaskWithRequest:completionHandler: method of NSURLSession
https://developer.apple.com/documentation/foundation/nsurlsession/1407613-datataskwithrequest
The completion handler has the third param as NSError. But I could not find the domain name for these errors. Is it expected to be NSURLErrorDomain if the error is related to the network request? Or is it kCFErrorDomainCFNetwork. Is there any exhaustive list of error domain names that one can encounter for the above method?
Thanks!
-
—
VC2
Add a CommentI am seeing that
kCFErrorDomainCFNetworkhas nearly all the error codes that are inNSURLErrorDomain. So I think I should be using error codes fromkCFErrorDomainCFNetwork. Can someone confirm? Thanks!