diff --git a/app/jobs/backtrace_job.rb b/app/jobs/backtrace_job.rb index 17755dc..50ee155 100644 --- a/app/jobs/backtrace_job.rb +++ b/app/jobs/backtrace_job.rb @@ -36,7 +36,7 @@ class BacktraceJob < ApplicationJob end begin - raise BacktraceException, params['errors']&.first&.dig('message') + raise BacktraceException, "#{origin}: #{params['errors']&.first&.dig('message')}" rescue BacktraceException => e ExceptionNotifier.notify_exception(e, data: { site: site.name, params: params, _backtrace: true }) end @@ -95,4 +95,11 @@ class BacktraceJob < ApplicationJob SourceMap::Map.from_hash data(map) end.reduce(&:+) end + + # @return [String] + def origin + URI.parse(params.dig('context', 'url')).host + rescue URI::Error + params.dig('context', 'url') + end end