title: ErrorType in swift - how do I get an error code out?
body: <p>I am passed an error - its an <code>ErrorType</code> - in a completion. </p>
  
  <p>I can 'po' it in the debugger, but how do I get the number -1009 out in swift code. The only call I can find to make is 'debugDescription'. Is there a Dictionary in there?</p>
  
  <p>Whoever made the ErrorType subclass is basically unknown to me. </p>
  
  <pre><code>po error
           ▿ Optional(Error Domain=NSURLErrorDomain Code=-1009 "The Internet   connection appears to be offline." UserInfo= {NSErrorFailingURLStringKey=https://xxxxxxxxxx.net/token, _kCFStreamErrorCodeKey=8, NSErrorFailingURLKey=https://xxxxxxxxxxx.net/token, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorDomainKey=12, NSUnderlyingError=0x145f7880 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8}}})
  </code></pre>