{"record":{"id":"cae912a691727ae3","repo":"redis/redis-rb","slug":"order-requires-count-or-exactly","errorCode":null,"errorMessage":"order requires count or exactly","messagePattern":"order requires count or exactly","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/redis/commands/lists.rb","lineNumber":410,"sourceCode":"          raise ArgumentError, \"timeout must be an Integer or Float, got: #{timeout.class}\"\n        end\n\n        args.flatten!(1)\n        command = [cmd].concat(args)\n        command << timeout\n        send_blocking_command(command, timeout, &blk)\n      end\n\n      def _movem_amount_args(count, exactly, order)\n        raise ArgumentError, \"Pick either count or exactly, not both\" if count && exactly\n\n        if count || exactly\n          order = order.to_s.upcase\n          raise ArgumentError, \"order must be 'OBO' or 'BULK'\" if order != \"OBO\" && order != \"BULK\"\n\n          [count ? \"COUNT\" : \"EXACTLY\", Integer(count || exactly), order]\n        elsif order\n          raise ArgumentError, \"order requires count or exactly\"\n        else\n          []\n        end\n      end\n\n      def _normalize_move_wheres(where_source, where_destination)\n        where_source      = where_source.to_s.upcase\n        where_destination = where_destination.to_s.upcase\n\n        if where_source != \"LEFT\" && where_source != \"RIGHT\"\n          raise ArgumentError, \"where_source must be 'LEFT' or 'RIGHT'\"\n        end\n\n        if where_destination != \"LEFT\" && where_destination != \"RIGHT\"\n          raise ArgumentError, \"where_destination must be 'LEFT' or 'RIGHT'\"\n        end\n\n        [where_source, where_destination]","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/redis/redis-rb/blob/2ba9010b91dab9e0fde1fbae3a9aae003f8bc307/lib/redis/commands/lists.rb#L392-L428","documentation":"Error \"order requires count or exactly\" thrown in redis/redis-rb.","triggerScenarios":"Thrown at lib/redis/commands/lists.rb:410 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["When passing order:, also pass count: or exactly: so the ordering has a defined element count to operate on.","Remove the order: option if you do not need ordered retrieval."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2ba9010b91dab9e0fde1fbae3a9aae003f8bc307","analyzedAt":"2026-08-23T03:54:57.017Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}