Skip to content

Ignore_notifier_if settings are not respected in non-Rack usages such as background jobs. #518

@synth

Description

@synth

Steps to reproduce

Given: ExceptionNotifier is configured with:

ignore_notifier_if: {
        email: ->(env, exception) { ... }
      },

And an exception notification is manually sent such as through a background worker with:

rescue => e
  ExceptionNotifier.notify_exception(e)
end

Expected behavior

The ignore_notifier block should be called and respected.

Actual behavior

The ignore_notifier block is not called nor respected. This is likely because the ignore block is only set via Rack, so any non-Rack usages of ExceptionNotifier will not retain the ignore settings.

System configuration

Rails version:
Rails v6+

Ruby version:
Ruby 2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions