Skip to Content Skip to Search

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.