Skip to content

Commit

Permalink
routing errors ignored by default, for airbrake#92
Browse files Browse the repository at this point in the history
  • Loading branch information
shime committed Jun 7, 2012
1 parent 8b01b01 commit 9ef00ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion features/rails.feature
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ Feature: Install the Gem in a Rails application
Scenario: Reporting 404s
When I configure the Airbrake shim
And I configure usage of Airbrake
And I configure the notifier to use the following configuration lines:
"""
config.ignore_only = []
"""
And I perform a request to "http://example.com:123/this/route/does/not/exist"
And I should see "The page you were looking for doesn't exist."
Then I should see "The page you were looking for doesn't exist."
And I should receive a Airbrake notification
2 changes: 1 addition & 1 deletion lib/airbrake/rails/middleware/exceptions_catcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def skip_user_agent?(env)
def render_exception_with_airbrake(env,exception)
controller = env['action_controller.instance']
env['airbrake.error_id'] = Airbrake.
notify(exception,
notify_or_ignore(exception,
controller.try(:airbrake_request_data) || :rack_env => env) unless skip_user_agent?(env)
if defined?(controller.rescue_action_in_public_without_airbrake)
controller.rescue_action_in_public_without_airbrake(exception)
Expand Down

0 comments on commit 9ef00ee

Please sign in to comment.