Error Handling with Alamofire in Swift 2
<p>Hi I am practising some code, my code is fine with <code>case .Success(let value):</code> and it is displaying alert but will <code>case .Failure(let error):</code> display alert with The 4xx class of status code? </p>

<pre><code>  Alamofire.request(.GET, URL).responseJSON { (response) -&gt; Void in
            if let value = response.result.value {

             let json = JSON(value)

             switch response.result {
             case .Success(let value):

             let name = json["name"].string
             if let nothing = name {
             self.alertMessage(message: "Name not Found")
                    } else {
            self.alertMessage(message: "Name Found")
                    }
            case .Failure(let error):
            self.alertMessage(message: "Error 4xx / 5xx")
                }
</code></pre>