You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrating from 4.3.4 to 5.0.1 and when I try to configure Airbrake using an inline add_filter, I'm getting an exception.
I've got the add_filter just like in the migration_guide for testing purposes:
Airbrake.add_filter do |notice|
if notice[:errors].any? { |error| error[:type] == 'RuntimeError' }
notice.ignore!
end
end
In a rails console I try this:
2.1.6 :003 > e = Exception.new("Hello World")
=> #<Exception: Hello World>
2.1.6 :004 > Airbrake.notify(e)
NoMethodError: undefined method `call' for nil:NilClass
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/filter_chain.rb:64:in `block in refine'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/filter_chain.rb:62:in `each'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/filter_chain.rb:62:in `refine'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/notifier.rb:123:in `send_notice'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/notifier.rb:45:in `notify'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:280:in `call_notifier'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:134:in `notify'
from (irb):4
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/console.rb:110:in `start'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/console.rb:9:in `start'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
If I switch the filter to be a class and new up that class in the add_filter call then it works fine.
The text was updated successfully, but these errors were encountered:
Migrating from 4.3.4 to 5.0.1 and when I try to configure Airbrake using an inline add_filter, I'm getting an exception.
I've got the add_filter just like in the migration_guide for testing purposes:
In a rails console I try this:
If I switch the filter to be a class and new up that class in the add_filter call then it works fine.
The text was updated successfully, but these errors were encountered: