Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom data formatter #492

Open
max-si-m opened this issue Jun 7, 2020 · 0 comments
Open

Add custom data formatter #492

max-si-m opened this issue Jun 7, 2020 · 0 comments

Comments

@max-si-m
Copy link

max-si-m commented Jun 7, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant