title: python requests: how can I get the "exception code"
body: <p>I am using "requests (2.5.1)" .now I want to catch the exception and return an dict with some exception message,the dict I will return is as following:</p>
  
  <pre><code>{
     "status_code":   61, # exception code,
     "msg": "error msg",
  }
  </code></pre>
  
  <p>but now I can't get the error status_code and error message,I try to use</p>
  
  <pre><code>try:
  .....
  except requests.exceptions.ConnectionError as e:
  response={
              u'status_code':4040,
              u'errno': e.errno,
              u'message': (e.message.reason),
              u'strerror': e.strerror,
              u'response':e.response,
          }
  </code></pre>
  
  <p>but it's too redundancy,how can I get the error message simplicity?anyone can give some idea?</p>