<commit_before>require 'exception_notification/rails'

require 'exception_notification/sidekiq'

ExceptionNotification.configure do |config|
  # Ignore additional exception types.
  # ActiveRecord::RecordNotFound, AbstractController::ActionNotFound and ActionController::RoutingError are already added.
  config.ignored_exceptions += %w{ActionView::TemplateError CustomError}

  # Adds a condition to decide when an exception must be ignored or not.
  # The ignore_if method can be invoked multiple times to add extra conditions.
  config.ignore_if do |exception, options|
    not Rails.application.secrets.error_emails.present?
  end

  # Notifiers =================================================================

  # Email notifier sends notifications by email.
  config.add_notifier :email, {
    email_prefix: "[#{Rails.env}][Registration Exception] ",
    sender_address: Rails.application.secrets.mail_full_email,
    exception_recipients: Rails.application.secrets.error_emails
  }

  # Campfire notifier sends notifications to your Campfire room. Requires 'tinder' gem.
  # config.add_notifier :campfire, {
  #   :subdomain => 'my_subdomain',
  #   :token => 'my_token',<commit_msg>ignore another exception, to prevent tenant errors from being e-mailed to us<commit_after>require 'exception_notification/rails'

require 'exception_notification/sidekiq'

ExceptionNotification.configure do |config|
  # Ignore additional exception types.
  # ActiveRecord::RecordNotFound, AbstractController::ActionNotFound and ActionController::RoutingError are already added.

  # Note: we ignore the ActionView::Template::Error because this is thrown
  #  if issues are raised while rendering the template
  config.ignored_exceptions += %w{Errors::TenantNotFound ActionView::Template::Error}

  # Adds a condition to decide when an exception must be ignored or not.
  # The ignore_if method can be invoked multiple times to add extra conditions.
  config.ignore_if do |exception, options|
    not Rails.application.secrets.error_emails.present?
  end

  # Notifiers =================================================================

  # Email notifier sends notifications by email.
  config.add_notifier :email, {
    email_prefix: "[#{Rails.env}][Registration Exception] ",
    sender_address: Rails.application.secrets.mail_full_email,
    exception_recipients: Rails.application.secrets.error_emails
  }

  # Campfire notifier sends notifications to your Campfire room. Requires 'tinder' gem.
  # config.add_notifier :campfire, {
  #   :subdomain => 'my_subdomain',
  #   :token => '<PASSWORD>',
{'fraction_non_alphanumeric': 0.130736598534516, 'fraction_numerical': 0.0, 'mean_word_length': 5.389162561576355, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3097644', 'n_tokens_mistral': 708, 'n_tokens_neox': 677, 'n_words': 199}