lib/wat_catcher/report.rb in wat_catcher-0.2.4 vs lib/wat_catcher/report.rb in wat_catcher-0.3.0

- old
+ new

@@ -12,14 +12,24 @@ def send_report ::WatCatcher::SidekiqPoster.perform_async("#{WatCatcher.configuration.host}/wats", params) end def params - { wat: exception_description.merge(request_description).merge(worker_description) } + { wat: exception_description.merge(request_description).merge(worker_description).merge(param_exception_description) } end + def param_exception_description + return {} if exception || request.blank? + wat_params = request.params[:wat] + { + backtrace: wat_params[:backtrace], + page_url: wat_params[:page_url], + request_params: nil + } + end def exception_description + return {} unless exception { backtrace: exception.backtrace.to_a, message: exception.message, error_class: exception.class.to_s, app_env: ::Rails.env.to_s,