{"record":{"id":"43d6ec00e82291b7","repo":"flippercloud/flipper","slug":"value-must-be-a-positive-number-less-than-or-equal","errorCode":null,"errorMessage":"value must be a positive number less than or equal to 100, but was #{value}","messagePattern":"value must be a positive number less than or equal to 100, but was #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/flipper/types/percentage.rb","lineNumber":10,"sourceCode":"require 'flipper/typecast'\n\nmodule Flipper\n  module Types\n    class Percentage < Type\n      def initialize(value)\n        value = Typecast.to_number(value)\n\n        if value < 0 || value > 100\n          raise ArgumentError,\n                \"value must be a positive number less than or equal to 100, but was #{value}\"\n        end\n\n        @value = value\n      end\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":19,"githubUrl":"https://github.com/flippercloud/flipper/blob/1f86de3ec91521585b156445e156642938b19cb0/lib/flipper/types/percentage.rb#L1-L19","documentation":"Error \"value must be a positive number less than or equal to 100, but was #{value}\" thrown in flippercloud/flipper.","triggerScenarios":"Thrown at lib/flipper/types/percentage.rb:10 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a number between 0 and 100 inclusive, e.g. Flipper[:feature].enable_percentage_of_actors 25","Clamp or validate user input before creating the percentage","Fix unit confusion: the value is a percentage (0-100), not a fraction (0-1)"],"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"}