exception_notification icon indicating copy to clipboard operation
exception_notification copied to clipboard

Add custom data formatter

Open max-si-m opened this issue 4 years ago • 0 comments

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

max-si-m avatar Jun 07 '20 14:06 max-si-m