`then` should be used only in cases when condition and action in one line, for example
```ruby
when 'ready' then msg = "Release downloaded successfully"
```
Also you can use case for variable assignment. This case  for example can be rewrite:

```ruby
msg = case status
      when 'error'
        error_uids = error_nodes.map{|n| n['uid']}
        "Cannot download release on nodes #{error_uids.inspect}"
      when 'ready'
        "Release downloaded successfully"
      else
        nil
      end
```