{"record":{"id":"48928e5439b4b1e8","repo":"mongodb/mongoid","slug":"calling-method-on-klass-resulted-in-a-false","errorCode":null,"errorMessage":"Calling %{method} on %{klass} resulted in a false return from a callback.","messagePattern":"Calling %(.+?) on %(.+?) resulted in a false return from a callback\\.","errorType":"exception","errorClass":"Mongoid::Errors::Callback","httpStatus":null,"severity":"error","filePath":"lib/mongoid/persistable.rb","lineNumber":142,"sourceCode":"    #\n    # @example Raise the validation error.\n    #   Person.fail_due_to_validation!(person)\n    #\n    # @raise [ Errors::Validations ] The validation error.\n    def fail_due_to_validation!\n      raise Errors::Validations.new(self)\n    end\n\n    # Raise an error if a callback failed.\n    #\n    # @example Raise the callback error.\n    #   Person.fail_due_to_callback!(person, :create!)\n    #\n    # @param [ Symbol ] method The method being called.\n    #\n    # @raise [ Errors::Callback ] The callback error.\n    def fail_due_to_callback!(method)\n      raise Errors::Callback.new(self.class, method)\n    end\n\n    private\n\n    # Are we executing an atomically block on the current document?\n    #\n    # @api private\n    #\n    # @example Are we executing atomically?\n    #   document.executing_atomically?\n    #\n    # @return [ true | false ] If we are current executing atomically.\n    def executing_atomically?\n      !@atomic_updates_to_execute_stack.nil?\n    end\n\n    # Post process the persistence operation.\n    #","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/mongodb/mongoid/blob/0da0e23d71adfbad31128c18e5e2c8c301c6f7c4/lib/mongoid/persistable.rb#L124-L160","documentation":"Error \"Calling %{method} on %{klass} resulted in a false return from a callback.\" thrown in mongodb/mongoid.","triggerScenarios":"Thrown at lib/mongoid/persistable.rb:142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0da0e23d71adfbad31128c18e5e2c8c301c6f7c4","analyzedAt":"2026-08-23T06:25:47.656Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}