Exception level filter not working for custom exception
Hey rollbar team,
I'm trying to ignore a specific exception but its not working
In my initializer/rollbar.rb, I have
config.exception_level_filters.merge!('CustomAuthenticationError' => 'ignore')
and I'm raising CustomAuthenticationError which is the following code:
class CustomAuthenticationError < StandardError
def initialize(message = nil)
super(message)
end
end
Ignoring ActionController::RoutingError works just not for my own exception. What am i missing?
Thanks!
I tested here, and it's working for me. Is it possible the error class is nested?
Something like this
class TestController < ApplicationController
class TestError < StandardError; end
end
will need to use
config.exception_level_filters.merge!('TestController::TestError' => 'ignore')
Otherwise, the filter depends on exception.class.name. You could try printing this for your exception class to be sure it matches the string you're using.
@arahman4710 are you still having trouble with this? Were you able to test what @waltjones proposed?