Skip to content

Stop sending 404s and unknown formats to Airbrake - #1458

Merged
caseyhelbling merged 2 commits into
supporter_level_goalfrom
fix/airbrake-ignore-routing-errors
Nov 6, 2026
Merged

caseyhelbling merged 2 commits into
supporter_level_goalfrom
fix/airbrake-ignore-routing-errors

Conversation

@caseyhelbling

Copy link
Copy Markdown

About half of Airbrake's notices are ActionController::RoutingError ("Nonprofit not found", "Campaign not found", "Not Found"), mostly from bots probing URLs. Over the last 30 days that was roughly 24,000 of about 48,000 notices. They bury real errors and use up the plan's monthly quota.

This adds ActionController::RoutingError and ActionController::UnknownFormat to the existing ignore list in config/initializers/airbrake.rb. The second commit fixes the type.class == Array comparison that standardrb flags in the same filter.

Still reported

  • ActiveRecord::RecordNotFound. Some of these are real bugs, such as "Couldn't find Payment without an ID".
  • The InvalidAuthenticityToken notices from ApplicationController#handle_unverified_request. Those need their own look: the handler notifies Airbrake but doesn't raise, so requests that fail the CSRF check still run.

Testing

I loaded the initializer and ran sample exceptions through Airbrake's filter chain:

Exception Ignored
ActionController::RoutingError yes
ActionController::UnknownFormat yes
EOFError (already ignored) yes
ActiveRecord::RecordNotFound no
RuntimeError "ActionController::InvalidAuthenticityToken" no
NoMethodError no

About half of Airbrake's notices are ActionController::RoutingError
("Nonprofit not found", "Campaign not found", "Not Found"), mostly from
bots probing URLs, plus a steady trickle of UnknownFormat. They bury
real errors and use up the plan's monthly quota. Add both to the
existing ignore list.

@wwahammy wwahammy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@caseyhelbling
caseyhelbling merged commit 21a895b into supporter_level_goal Nov 6, 2026
5 checks passed
@caseyhelbling
caseyhelbling deleted the fix/airbrake-ignore-routing-errors branch November 6, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants