title: iOS Swift 2 - Alamofire print response value when Failure
body: <p>I'm using Alamofire for my http requests but I'm not able to get error message from requests that don't pass validation</p>
  
  <pre><code>Alamofire.request(method, url, headers: headers, parameters: parameters, encoding: encoding)
              .validate(statusCode: 200..&lt;300)
              .responseJSON { response in
  
                  switch response.result {
                  case .Success:
                      // response.result.value returns JSON
  
                  case .Failure(let error):
                      // response.result.value returns nil
                  }
          }
  </code></pre>
  
  <p>How can I get data (JSON) if I get error code 400 and others. The API is sending the data in body even if the request was not successful.</p>