title: NSURLSession error handling
body: <p>Using Swift and NSURLSession. The NSError localizedDescription I get is very generic when I don't have internet connection (manually turned off wifi/cell network). It says "<em>The operation couldn’t be completed.</em>"</p>
  
  <pre><code>var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -&gt; Void in
  </code></pre>
  
  <p>I'm looking for a more specific message to send to the user. I enabled a breakpoint and inspected all objects but can't find anything good.</p>
  
  <p>Prior to swift I was using AFNetworking with objective C:</p>
  
  <pre><code>failure:^(AFHTTPRequestOperation *operation, NSError *error) {
  </code></pre>
  
  <p>The error messages I would get here were very descriptive, something like "<em>the internet connection appears to be offline</em>"</p>