When I send a request and get an error with the error code -1009
, what does that mean? I'm not sure how to handle it.
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
NSLog(@"connection didFailWithError");
if(error.code==-1009){
//do something
}
}
Since the error returned should be within the NSURLErrorDomain
, the code -1009
means:
NSURLErrorNotConnectedToInternet
Returned when a network resource was requested, but an internet connection is not established and cannot be established automatically, either through a lack of connectivity, or by the user's choice not to make a network connection automatically.