Maybe it would be better to always return JSON? Something like:

```ruby
render :json => { :error => "Comment is not valid" }, :status => 422
```

And I thing that a 4xx status is more suited for this error. Maybe 422. Not sure...