✅ Check for other accounts without a subscription ✅ Find out why some accounts don't have a subscription ✅ Fix the root problem ✅ Add missing subscriptions to accounts , Steps to fix -
“Invest in your monitoring and exception traceability. When you have a hard time racing an exception. Ask yourself - what more information I need? . Then add it.”
class Achievements::Job < ApplicationJob def perform(achievement, user) Handle::RaceCondition.call do Achievements::Create.call achievement, user end end end
class Notifications::DeliverJob < ApplicationJob queue_as :notifications def perform(event) Notifications::Deliver.call(event) rescue Errno::ECONNRESET retry_job end end
class Notifications::DeliverJob < ApplicationJob queue_as :notifications def perform(event) Notifications::Deliver.call(event) rescue Errno::ECONNRESET, EOFError retry_job end end
class Notifications::Deliver < ApplicationJob queue_as :notifications def perform(event) Notifications::Deliver.call(event) rescue Handle::NetworkErrors retry_job end end
class Notifications::Deliver::Job < ApplicationJob include Handle::Job::NetworkErrors queue_as :notifications def perform(event) Notifications::Deliver.call(event) end end
) Have process around exceptions. ) Be explicit around the exceptions ) Reduce noise ) Don't hide exceptions ) Invest in your monitoring ) Have tooling around handling common exceptions