From 1608d7ca07589245e8d526cbcbe066f07369842a Mon Sep 17 00:00:00 2001 From: Andy Wallace Date: Thu, 22 Aug 2024 13:14:04 -0700 Subject: [PATCH] Stop notifying Rollbar common errors that aren't useful to us These are generally caused by bots looking for wordpress weaknesses. They're using up our rollbar quota --- config/initializers/rollbar.rb | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/config/initializers/rollbar.rb b/config/initializers/rollbar.rb index 0fddd57fd..07be544f8 100644 --- a/config/initializers/rollbar.rb +++ b/config/initializers/rollbar.rb @@ -33,20 +33,9 @@ # Valid levels: 'critical', 'error', 'warning', 'info', 'debug', 'ignore' # 'ignore' will cause the exception to not be reported at all. config.exception_level_filters.merge!( - 'ActionController::RoutingError' => lambda do |error| - case error.message - when 'No route matches [GET] "/ads.txt"', 'No route matches [GET] "/sheetmusic"' - 'ignore' - when 'Not Found' - if error.backtrace&.first&.match?(/\/blacklight\/catalog.rb\:\d+\:in `facet'/) - 'ignore' - else - 'warning' - end - else - 'warning' - end - end, + 'ActionController::RoutingError' => 'ignore', + 'ActionController::InvalidAuthenticityToken' => 'ignore', + 'I18n::InvalidLocale' => 'ignore', 'Blacklight::Exceptions::RecordNotFound' => 'ignore' )