module Airbrake::Rails::ActiveRecord

def run_callbacks(kind, *args, &block)

rubocop:disable Lint/RescueException

notifying about exceptions.
Patches default +run_callbacks+ with our version, which is capable of
def run_callbacks(kind, *args, &block)
  # Let the post process handle the exception if it's not a bugged hook.
  return super unless %i[commit rollback].include?(kind)
  # Handle the exception ourselves. The 'ex' exception won't be
  # propagated, therefore we must notify it here.
  begin
    super
  rescue Exception => ex
    Airbrake.notify(ex)
    raise ex
  end
end