mongodb/mongoid · error · Mongoid::Errors::InvalidFind

Errors::InvalidFind.new

Error message

Errors::InvalidFind.new

What it means

Error "Errors::InvalidFind.new" thrown in mongodb/mongoid.

Source

Thrown at lib/mongoid/criteria/findable.rb:177

      #
      # @example Are these arguments a list of values?
      #   multi_args?([ 1, 2, 3 ]) #=> true
      #
      # @param [ Array ] args The arguments.
      #
      # @return [ true | false ] Whether the arguments are a list.
      def multi_args?(args)
        args.size > 1 || (!args.first.is_a?(Hash) && args.first.resizable?)
      end

      # Convenience method of raising an invalid find error.
      #
      # @example Raise the error.
      #   criteria.raise_invalid
      #
      # @raise [ Errors::InvalidFind ] The error.
      def raise_invalid
        raise Errors::InvalidFind.new
      end
    end
  end
end

View on GitHub (pinned to 0da0e23d71)

When it happens

Trigger: Thrown at lib/mongoid/criteria/findable.rb:177 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mongodb/mongoid@0da0e23d71 (2026-08-23). Data as JSON: /api/errors/381f175d850f4a7e. Report an issue: GitHub.