```ruby
object false
node(:error) { I18n.t(:invalid_resource, :scope => "refinery.api") }
node(:errors) { @resource.errors.to_hash }
```

Fix Internal Server Error when uploading invalid image via API
user
```ruby
object false
node(:error) { I18n.t(:invalid_resource, :scope => "refinery.api") }
node(:errors) { @Array(@resource).map{|r| r.errors.to_hash } }
```
assistant