title: Get Errno from Python Requests ConnectionError?
body: <p>I'm catching and printing Python Requests ConnectionErrors fine with just this:</p>
  
  <pre><code>except requests.exceptions.ConnectionError as e:
      logger.warning(str(e.message))
  </code></pre>
  
  <p>It prints out messages such as:</p>
  
  <pre><code>HTTPSConnectionPool(host='10.100.24.16', port=443): Max retries exceeded with url: /api/datastores/06651841-bbdb-472a-bde2-689d8cb8da19 (Caused by &lt;class 'socket.error'&gt;: [Errno 61] Connection refused)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>HTTPSConnectionPool(host='10.100.24.16', port=443): Max retries exceeded with url: /api/datastores/06651841-bbdb-472a-bde2-689d8cb8da19 (Caused by &lt;class 'socket.error'&gt;: [Errno 65] No route to host)
  </code></pre>
  
  <p>And many others. What I'm wondering is, what's the best, most Pythonic, way to get that errno that's displaying in the message? I'd like to have a reliable system for catching the issues and offering as helpful and relevant error message to the user as possible. As far as I can tell, ConnectionError is an indirect decedent of BaseException, with no new properties or methods being added beyond what BaseException offers. I'm hesitant to simply use regex because it seems to me I run the risk of assuming all error messages are formatted the same way in all localities.</p>