123456789_123456789_123456789_123456789_123456789_

Class: ActiveJob::DeserializationError::RecordNotFound

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, DeserializationError
Instance Chain:
self, DeserializationError
Inherits: DeserializationError
  • ::Object
Defined in: activejob/lib/active_job/arguments.rb

Overview

Raised when arguments couldn't be deserialized because a record they reference through a Global ID no longer exists, most likely because it was deleted after the job was enqueued.

Jobs whose arguments may legitimately reference deleted records can discard this error:

class SearchIndexingJob < ApplicationJob
discard_on ActiveJob::DeserializationError::RecordNotFound
end

Unlike its parent class, it isn't raised for other errors that may occur while deserializing arguments, such as transient database connectivity failures, where the referenced record may still exist and a retry could succeed.