{"record":{"id":"c815d90423ccfe43","repo":"flippercloud/flipper","slug":"gate-key-is-not-a-valid-flipper-gate-key","errorCode":null,"errorMessage":"#{gate.key} is not a valid flipper gate key","messagePattern":"#(.+?) is not a valid flipper gate key","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/flipper/adapters/http.rb","lineNumber":200,"sourceCode":"          csv_keys = features.map { |feature| query_escape(feature.key) }.join(',')\n          \"keys=#{csv_keys}&exclude_gate_names=true\"\n        end\n      end\n\n      def request_body_for_gate(gate, value)\n        data = case gate.key\n        when :boolean\n          {}\n        when :groups\n          { name: value.to_s }\n        when :actors\n          { flipper_id: value.to_s }\n        when :percentage_of_actors, :percentage_of_time\n          { percentage: value.to_s }\n        when :expression\n          value\n        else\n          raise \"#{gate.key} is not a valid flipper gate key\"\n        end\n        JSON.generate(data)\n      end\n\n      def result_for_feature(feature, api_gates)\n        api_gates ||= []\n        result = default_config\n\n        feature.gates.each do |gate|\n          api_gate = api_gates.detect { |ag| ag['key'] == gate.key.to_s }\n          result[gate.key] = value_for_gate(gate, api_gate) if api_gate\n        end\n\n        result\n      end\n\n      def value_for_gate(gate, api_gate)\n        value = api_gate['value']","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/flippercloud/flipper/blob/1f86de3ec91521585b156445e156642938b19cb0/lib/flipper/adapters/http.rb#L182-L218","documentation":"Error \"#{gate.key} is not a valid flipper gate key\" thrown in flippercloud/flipper.","triggerScenarios":"Thrown at lib/flipper/adapters/http.rb:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the gate key spelling; valid keys are like :boolean, :actors, :groups, :percentage_of_actors, :percentage_of_time, :expression","Use gate.key values produced by Flipper itself rather than hand-constructed strings","Upgrade both client and server gems so their gate key sets match"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1f86de3ec91521585b156445e156642938b19cb0","analyzedAt":"2026-08-23T04:36:09.896Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}