Please switch to:
 
```ruby
unless res and res.code == 200
```