 <p><code>do/try/catch</code> will catch errors that are thrown by some other method, but it won't catch runtime exceptions, such as you are getting from the forced downcast. For example, if <code>data</code> was invalid JSON then an error will be thrown and caught. In your case it seems the JSON is valid, but it is a dictionary, not an array. </p> <p>You want something like </p> <pre><code>setQA = nil do { if let json = try NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.AllowFragments) as? [AnyObject] { setQA = json print(setQA) } else { self.customAlert("Invalid response from server") } } catch _ { self.customAlert("Error parsing JSON") } </code></pre>