lib/generators/disco_app/templates/initializers/rollbar.rb in disco_app-0.9.11 vs lib/generators/disco_app/templates/initializers/rollbar.rb in disco_app-0.10.0
- old
+ new
@@ -7,6 +7,13 @@
config.enabled = false
end
# Enable delayed reporting (using Sidekiq)
config.use_sidekiq
+
+ # Add custom handlers.
+ config.before_process << proc do |options|
+ if options[:exception].is_a?(ActiveResource::ClientError) and options[:exception].message.include?('Too Many Requests')
+ raise Rollbar::Ignore
+ end
+ end
end