diff --git a/lib/seek/config.rb b/lib/seek/config.rb index 20cecdea12..c4a9fdb34e 100644 --- a/lib/seek/config.rb +++ b/lib/seek/config.rb @@ -106,25 +106,23 @@ def configure_recaptcha_keys end def configure_exception_notification - if exception_notification_enabled && Rails.env.production? + if true#exception_notification_enabled && Rails.env.production? ExceptionNotification.configure do |config| - config.register_exception_notifier :email, { - ignore_exceptions: ['ActionDispatch::Http::Parameters::ParseError', - 'ActionController::InvalidAuthenticityToken', - 'ActionController::UnknownHttpMethod', - 'ActionController::BadRequest'] + ExceptionNotifier.ignored_exceptions, - email: { - sender_address: [noreply_sender], - email_prefix: "[ #{instance_name} ERROR ] ", - exception_recipients: exception_notification_recipients.nil? ? [] : exception_notification_recipients.split(/[, ]/) - }, - error_grouping: error_grouping_enabled, - error_grouping_period: error_grouping_timeout, - notification_trigger: ->(exception, count) { + config.ignored_exceptions = ['ActionDispatch::Http::Parameters::ParseError', + 'ActionController::InvalidAuthenticityToken', + 'ActionController::UnknownHttpMethod', + 'ActionController::BadRequest'] | ExceptionNotifier.ignored_exceptions + config.error_grouping = error_grouping_enabled, + config.error_grouping_period = error_grouping_timeout, + config.notification_trigger = ->(exception, count) { # Send notifications at count = x^0, x^1, x^3, x^4... where # x = error_grouping_log_base (Math.log(count, error_grouping_log_base) % 1).zero? } + config.register_exception_notifier :email, { + sender_address: [noreply_sender], + email_prefix: "[ #{instance_name} ERROR ] ", + exception_recipients: exception_notification_recipients.nil? ? [] : exception_notification_recipients.split(/[, ]/) } end else