lib/honeybadger/init/rails.rb in honeybadger-5.23.0 vs lib/honeybadger/init/rails.rb in honeybadger-5.24.0
- old
+ new
@@ -12,12 +12,14 @@
end
initializer 'honeybadger.install_middleware' do |app|
honeybadger_config = Honeybadger::Agent.instance.config
- app.config.middleware.insert(0, Honeybadger::Rack::ErrorNotifier)
- app.config.middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserInformer) if honeybadger_config[:'user_informer.enabled']
- app.config.middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserFeedback) if honeybadger_config[:'feedback.enabled']
+ if honeybadger_config[:'exceptions.enabled']
+ app.config.middleware.insert(0, Honeybadger::Rack::ErrorNotifier)
+ app.config.middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserInformer) if honeybadger_config[:'user_informer.enabled']
+ app.config.middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserFeedback) if honeybadger_config[:'feedback.enabled']
+ end
end
config.before_initialize do
Honeybadger.init!({
:root => ::Rails.root.to_s,