Rescue from MultiJson::DecodeError in Ruby on Rails
If you are developing an API with Rails you need to rescue from the errors produced by a bad formatted JSON. In order to do that I use a middleware file placed in app/middleware named ParamsParserRescue.rb. ...