From f50628ad3ef467cd3487e874ce5b0139fb4dabdf Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Sun, 7 Dec 2025 12:53:10 +0100 Subject: [PATCH] Update ExceptionReporter --- app/services/exception_reporter.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/services/exception_reporter.rb b/app/services/exception_reporter.rb index 40bd0ba5..8cdd88f3 100644 --- a/app/services/exception_reporter.rb +++ b/app/services/exception_reporter.rb @@ -4,8 +4,12 @@ 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) + 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