class ActiveSupport::ErrorReporter

def unsubscribe(subscriber)

Rails.error.unsubscribe(MyErrorSubscriber)
# or
Rails.error.unsubscribe(subscriber)

Rails.error.subscribe(subscriber)
subscriber = MyErrorSubscriber.new

Unregister an error subscriber. Accepts either a subscriber or a class.
def unsubscribe(subscriber)
  @subscribers.delete_if { |s| subscriber === s }
end