Use shorter Alert syntax

I still think that some of these objects won't be visible in Bugsnag but
I don't want to test any more on cases that were broken before and may
not be relevant now.
This commit is contained in:
Maikel Linke
2024-11-21 15:25:53 +11:00
parent 6a8cc410d2
commit af33fc357e
3 changed files with 3 additions and 11 deletions

View File

@@ -22,11 +22,7 @@ class ReportJob < ApplicationJob
broadcast_result(channel, format, blob) if channel
rescue StandardError => e
Alert.raise(e) do |payload|
payload.add_metadata :report, {
report_class:, user:, params:, format:
}
end
Alert.raise(e, { report: { report_class:, user:, params:, format: } })
broadcast_error(channel)
end

View File

@@ -108,8 +108,6 @@ class SubscriptionConfirmJob < ApplicationJob
record_and_log_error(:failed_payment, order, error_message)
SubscriptionMailer.failed_payment_email(order).deliver_now
rescue StandardError => e
Alert.raise(e) do |payload|
payload.add_metadata :subscription_data, { order:, error_message: }
end
Alert.raise(e, { subscription_data: { order:, error_message: } })
end
end

View File

@@ -54,9 +54,7 @@ class PlaceProxyOrder
true
rescue StandardError => e
Alert.raise(e) do |payload|
payload.add_metadata(:proxy_order, { subscription:, proxy_order: })
end
Alert.raise(e, { proxy_order: { subscription:, proxy_order: } })
false
end