flippercloud/flipper · error · ArgumentError

#{name} must be a String or Symbol

Error message

#{name} must be a String or Symbol

What it means

Error "#{name} must be a String or Symbol" thrown in flippercloud/flipper.

Source

Thrown at lib/flipper/dsl.rb:222

    end

    # Public: Remove a feature.
    #
    # name - The String or Symbol name of the feature.
    #
    # Returns result of remove.
    def remove(name)
      feature(name).remove
    end

    # Public: Access a feature instance by name.
    #
    # name - The String or Symbol name of the feature.
    #
    # Returns an instance of Flipper::Feature.
    def feature(name)
      if !name.is_a?(String) && !name.is_a?(Symbol)
        raise ArgumentError, "#{name} must be a String or Symbol"
      end

      @memoized_features.compute_if_absent(name.to_sym) do
        Feature.new(name, @adapter, instrumenter: instrumenter)
      end
    end

    # Public: Preload the features with the given names.
    #
    # names - An Array of String or Symbol names of the features.
    #
    # Returns an Array of Flipper::Feature.
    def preload(names)
      features = names.map { |name| feature(name) }
      @adapter.get_multi(features)
      features
    end

View on GitHub (pinned to 1f86de3ec9)

Solutions

  1. Pass the feature name as a String or Symbol, e.g. Flipper[:search] or Flipper['search']
  2. Convert the object with to_s or to_sym before calling Flipper methods
  3. Check for a nil or object being passed where the feature name should be

When it happens

Trigger: Thrown at lib/flipper/dsl.rb:222 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of flippercloud/flipper@1f86de3ec9 (2026-08-23). Data as JSON: /api/errors/4c906b6008324f9b. Report an issue: GitHub.