ActiveJob docs for exception handling provide this example for how to handle exception handling in the context of a job:
class GuestsCleanupJob < ActiveJob::Base queue_as :default rescue_from(ActiveRecord::RecordNotFound) do |exception|
I use this technique in an application that I create and catch certain exceptions. My question is: how to fix all exceptions?
I deal with various exceptions and execute the same procedure every time, so I would like to DRY my code, and in my current implementation some exceptions are ignored, which means that in some cases my work fails.
How to get any general exception using ActiveJob?
source share