{"record":{"id":"198e686311aeb0ad","repo":"bensheldon/good_job","slug":"properties-must-be-a-hash","errorCode":null,"errorMessage":"Properties must be a Hash","messagePattern":"Properties must be a Hash","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"app/models/good_job/batch_record.rb","lineNumber":124,"sourceCode":"    class PropertySerializer\n      def self.dump(value)\n        ActiveJob::Arguments.serialize([value]).first\n      end\n\n      def self.load(value)\n        ActiveJob::Arguments.deserialize([value]).first\n      end\n    end\n\n    if Rails.gem_version < Gem::Version.new('7.1.0.alpha')\n      serialize :serialized_properties, PropertySerializer, default: -> { {} }\n    else\n      serialize :serialized_properties, coder: PropertySerializer, default: -> { {} }\n    end\n    alias_attribute :properties, :serialized_properties\n\n    def properties=(value)\n      raise ArgumentError, \"Properties must be a Hash\" unless value.is_a?(Hash)\n\n      self.serialized_properties = value\n    end\n\n    def jobs_finished?\n      self.class.jobs_finished_at_migrated? ? jobs_finished_at : finished_at\n    end\n\n    def jobs_finished_at\n      self.class.jobs_finished_at_migrated? ? self[:jobs_finished_at] : self[:finished_at]\n    end\n\n    private\n\n    def advisory_lock_maybe(value, &block)\n      if value\n        transaction { with_advisory_lock(function: \"pg_advisory_xact_lock\", &block) }\n      else","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/bensheldon/good_job/blob/5fcde48f8765e69901ffa9c5a06122b19c73875f/app/models/good_job/batch_record.rb#L106-L142","documentation":"Error \"Properties must be a Hash\" thrown in bensheldon/good_job.","triggerScenarios":"Thrown at app/models/good_job/batch_record.rb:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a Hash for the properties argument when building a BatchRecord.","Ensure the properties value is a Hash, not an Array, String, or nil."],"exampleFix":"GoodJob::BatchRecord.new(properties: { key: 'value' })","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5fcde48f8765e69901ffa9c5a06122b19c73875f","analyzedAt":"2026-08-23T14:55:11.399Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}