Skip to content

Commit

Permalink
Stop notifying Rollbar common errors that aren't useful to us
Browse files Browse the repository at this point in the history
These are generally caused by bots looking for wordpress weaknesses. They're using up our rollbar quota
  • Loading branch information
sourcefilter committed Aug 22, 2024
1 parent 25a6b5d commit 1608d7c
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions config/initializers/rollbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)

Expand Down

0 comments on commit 1608d7c

Please sign in to comment.