Skip to content

Add custom data formatter #492

@max-si-m

Description

@max-si-m

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions