diff --git a/app/jobs/backtrace_job.rb b/app/jobs/backtrace_job.rb index 50ee155b..0f3f5de8 100644 --- a/app/jobs/backtrace_job.rb +++ b/app/jobs/backtrace_job.rb @@ -30,7 +30,9 @@ class BacktraceJob < ApplicationJob # Encuentra el código fuente del error source = data.dig('sourcesContent', data['sources']&.index(backtrace['file']))&.split("\n") - backtrace['function'] = source[backtrace['line'] - 1] if source.present? + # XXX: Elimina la sangría aunque cambie las columnas porque + # eso lo vamos a ver en el archivo fuente directo. + backtrace['function'] = source[backtrace['line'] - 1].strip if source.present? end end end diff --git a/app/views/exception_notifier/_data.text.erb b/app/views/exception_notifier/_data.text.erb index 3493d68b..09313f4c 100644 --- a/app/views/exception_notifier/_data.text.erb +++ b/app/views/exception_notifier/_data.text.erb @@ -3,7 +3,7 @@ # <%= error['type'] %>: <%= error['message'] %> ``` -<%= Terminal::Table.new headings: error['backtrace'].first.keys, rows: error['backtrace'].map(&:values).map(&:strip) %> +<%= Terminal::Table.new headings: error['backtrace'].first.keys, rows: error['backtrace'].map(&:values) %> ``` <% end %>