Some bots or other external requests cause an ActionController::UnknownFormat
error when redirecting
Is there a catch-all method to add somewhere in application_controller to handle those errors ?
A config spec to add a default method in request (if none specified) ?
Below an example of trace :
An ActionController::UnknownFormat occurred in main#index:
ActionController::UnknownFormat
app/controllers/main_controller.rb:17:in `index'
-------------------------------
Request:
-------------------------------
* URL : http://ownedurl.com/
* HTTP Method: GET
* IP address : 82.xxx.xxx.xxx
* Parameters : {"controller"=>"main", "action"=>"index"}
* Timestamp : 2015-06-07 20:54:32 +0200
* Server : servername
* Rails root : /var/www/ownedurl.com/releases/208
* Process: 29726
A get request would obviously work; yet it makes it occurs.
Experiences on this one appreciated thx a lot