Rails 4.x returns error information in HTML page whenever there is any exception, in the development environment. This is fine for normal HTML requests. But traditionally, Rails always returned with HTML response for exceptions for all requests, including JSON on XML requests in development. We can now generate API only apps in Rails 5. In case of such apps, it's better to have the error message i