flippercloud/flipper · error · Flipper::Registry::DuplicateKey
#{key} is already registered
Error message
#{key} is already registered What it means
Error "#{key} is already registered" thrown in flippercloud/flipper.
Source
Thrown at lib/flipper/registry.rb:39
def initialize(source = {})
@mutex = Mutex.new
@source = source
end
def keys
@mutex.synchronize { @source.keys }
end
def values
@mutex.synchronize { @source.values }
end
def add(key, value)
key = key.to_sym
@mutex.synchronize do
if @source[key]
raise DuplicateKey, "#{key} is already registered"
else
@source[key] = value
end
end
end
def get(key)
key = key.to_sym
@mutex.synchronize do
@source[key]
end
end
def key?(key)
key = key.to_sym
@mutex.synchronize do
@source.key?(key)
endView on GitHub (pinned to 1f86de3ec9)
Solutions
- Choose a different key; each gate/expression name can only be registered once
- Check for duplicate registration, often caused by loading a file twice (use require instead of load)
- Unregister the existing key first if you intentionally need to replace it
When it happens
Trigger: Thrown at lib/flipper/registry.rb:39 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/4248c6b70327eeba.
Report an issue: GitHub.