dawarich/app/services/exception_reporter.rb
Eugene Burmakin 4fedac720b Add tests
2025-12-07 01:50:01 +01:00

11 lines
280 B
Ruby

# frozen_string_literal: true
class ExceptionReporter
def self.call(exception, human_message = 'Exception reported')
return if DawarichSettings.self_hosted?
Rails.logger.error "#{human_message}: #{exception.message}"
Sentry.capture_exception(exception)
end
end