On Rails 8.1+, jobs using ActiveJob::Continuable raise ArgumentError: expect the argument to be a Exception, got NilClass when config.rails.active_job_report_on_retry_error = true and the job is interrupted or resumes after an error.
Continuable resumes via retry_job without an error, and our enqueue_retry.active_job handler passes the missing error straight to capture_exception. The resumption is already enqueued at that point, so the current execution failing can lead to duplicate runs.
On Rails 8.1+, jobs using
ActiveJob::ContinuableraiseArgumentError: expect the argument to be a Exception, got NilClasswhenconfig.rails.active_job_report_on_retry_error = trueand the job is interrupted or resumes after an error.Continuable resumes via
retry_jobwithout an error, and ourenqueue_retry.active_jobhandler passes the missing error straight tocapture_exception. The resumption is already enqueued at that point, so the current execution failing can lead to duplicate runs.