redis/redis-rb · error · ArgumentError

where_source must be 'LEFT' or 'RIGHT'

Error message

where_source must be 'LEFT' or 'RIGHT'

What it means

Error "where_source must be 'LEFT' or 'RIGHT'" thrown in redis/redis-rb.

Source

Thrown at lib/redis/commands/lists.rb:421

        if count || exactly
          order = order.to_s.upcase
          raise ArgumentError, "order must be 'OBO' or 'BULK'" if order != "OBO" && order != "BULK"

          [count ? "COUNT" : "EXACTLY", Integer(count || exactly), order]
        elsif order
          raise ArgumentError, "order requires count or exactly"
        else
          []
        end
      end

      def _normalize_move_wheres(where_source, where_destination)
        where_source      = where_source.to_s.upcase
        where_destination = where_destination.to_s.upcase

        if where_source != "LEFT" && where_source != "RIGHT"
          raise ArgumentError, "where_source must be 'LEFT' or 'RIGHT'"
        end

        if where_destination != "LEFT" && where_destination != "RIGHT"
          raise ArgumentError, "where_destination must be 'LEFT' or 'RIGHT'"
        end

        [where_source, where_destination]
      end
    end
  end
end

View on GitHub (pinned to 2ba9010b91)

Solutions

  1. Pass where_source: 'LEFT' or where_source: 'RIGHT' (or the corresponding symbol).
  2. Fix the typo or casing in the where_source option value.

When it happens

Trigger: Thrown at lib/redis/commands/lists.rb:421 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of redis/redis-rb@2ba9010b91 (2026-08-23). Data as JSON: /api/errors/87dfdfd7d448c1a6. Report an issue: GitHub.