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
if User.current&.admin? && exception.try(:cause).is_a?(ActiveRecord::SubclassNotFound)
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',
layout: !request.xhr?,
......
......@@ -7,7 +7,7 @@ module ForemanCement
extend ActiveSupport::Concern
module Overrides
def exception(context_message, exception, **options)
def exception(context_message, exception, options = {})
super
sentry_context = {
......
......@@ -18,8 +18,9 @@ Sentry.init do |config|
end
end
filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
config.before_send = lambda do |event, _hint|
filter.filter(event.to_hash)
end
## FIXME: Filters out required Sentry data if enabled
# filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
# config.before_send = lambda do |event, _hint|
# filter.filter(event.to_hash)
# 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