mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user