dawarich/app/services/exception_reporter.rb
2025-06-30 23:54:45 +02:00

11 lines
284 B
Ruby

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