I would suggest to just ignore this error in your exception notifier instead.
Lead by a
discussion
Show archive.org snapshot
of this issue, I built in a middleware which answers those requests with [400] bad request
rather than raising an ArgumentError
.
I put it into app/util
and configured application.rb
like that:
# catches 'invalid %-encoding' error
require "#{Rails.root}/app/util/exception_app"
config.middleware.insert_before Rack::Runtime, ExceptionApp::Middleware
Note: Rails 4.2+ raises an ActionController::BadRequest
error instead of an ArgumentError
.
Posted by Martin Straub to makandra dev (2015-11-03 10:26)