Skip to content
Snippets Groups Projects
Verified Commit fa2682c1 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Fix a series of discovered issues

parent a6dfd0c3
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ module ForemanCement ...@@ -10,7 +10,7 @@ module ForemanCement
if User.current&.admin? && exception.try(:cause).is_a?(ActiveRecord::SubclassNotFound) if User.current&.admin? && exception.try(:cause).is_a?(ActiveRecord::SubclassNotFound)
ex_message = exception.message ex_message = exception.message
Foreman::Logging.exception("[Reported to Sentry as #{Sentry.last_event_id}] #{ex_message}", exception) Foreman::Logging.exception("[Reported to Sentry] #{ex_message}", exception)
render template: 'foreman_cement/500', render template: 'foreman_cement/500',
layout: !request.xhr?, layout: !request.xhr?,
......
...@@ -7,7 +7,7 @@ module ForemanCement ...@@ -7,7 +7,7 @@ module ForemanCement
extend ActiveSupport::Concern extend ActiveSupport::Concern
module Overrides module Overrides
def exception(context_message, exception, **options) def exception(context_message, exception, options = {})
super super
sentry_context = { sentry_context = {
......
...@@ -18,8 +18,9 @@ Sentry.init do |config| ...@@ -18,8 +18,9 @@ Sentry.init do |config|
end end
end end
filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters) ## FIXME: Filters out required Sentry data if enabled
config.before_send = lambda do |event, _hint| # filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
filter.filter(event.to_hash) # config.before_send = lambda do |event, _hint|
end # filter.filter(event.to_hash)
# end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment