exception_notification
exception_notification copied to clipboard
Add custom data formatter
Would it be nice to add a getter for custom data into Formatter?
def custom_data
return unless env
custom_data = env["exception_notifier.exception_data"] || {}
return if custom_data.empty?
text = []
text << '```'
custom_data.each { |key, value| text << "* #{key} : #{value}" }
text << '```'
text.join("\n")
end
Expected behavior
Nice to have a method to get formatted custom data
Actual behavior
Formatter method for custom data is missed
System configuration
Rails version: 6.0.3.1 Ruby version: 2.6.4