Update ExceptionReporter

This commit is contained in:
Eugene Burmakin 2025-12-07 12:53:10 +01:00
parent cf35c71461
commit f50628ad3e

View file

@ -4,8 +4,12 @@ class ExceptionReporter
def self.call(exception, human_message = 'Exception reported')
return if DawarichSettings.self_hosted?
if exception.is_a?(Exception)
Rails.logger.error "#{human_message}: #{exception.message}"
Sentry.capture_exception(exception)
else
Rails.logger.error "#{exception}: #{human_message}"
Sentry.capture_message("#{exception}: #{human_message}")
end
end
end