{"record":{"id":"6b2841768d4f5752","repo":"flippercloud/flipper","slug":"version-should-be-a-string","errorCode":null,"errorMessage":"version should be a string","messagePattern":"version should be a string","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/flipper/cloud/message_verifier.rb","lineNumber":23,"sourceCode":"  module Cloud\n    class MessageVerifier\n      class InvalidSignature < StandardError; end\n\n      DEFAULT_VERSION = \"v1\"\n\n      def self.header(signature, timestamp, version = DEFAULT_VERSION)\n        raise ArgumentError, \"timestamp should be an instance of Time\" unless timestamp.is_a?(Time)\n        raise ArgumentError, \"signature should be a string\" unless signature.is_a?(String)\n        \"t=#{timestamp.to_i},#{version}=#{signature}\"\n      end\n\n      def initialize(secret:, version: DEFAULT_VERSION)\n        @secret = secret\n        @version = version || DEFAULT_VERSION\n\n        raise ArgumentError, \"secret should be a string\" unless @secret.is_a?(String)\n        raise ArgumentError, \"secret should not be empty\" if @secret.empty?\n        raise ArgumentError, \"version should be a string\" unless @version.is_a?(String)\n      end\n\n      def generate(payload, timestamp)\n        raise ArgumentError, \"timestamp should be an instance of Time\" unless timestamp.is_a?(Time)\n        raise ArgumentError, \"payload should be a string\" unless payload.is_a?(String)\n\n        OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new(\"sha256\"), @secret, \"#{timestamp.to_i}.#{payload}\")\n      end\n\n      def header(signature, timestamp)\n        self.class.header(signature, timestamp, @version)\n      end\n\n      # Public: Verifies the signature header for a given payload.\n      #\n      # Raises a InvalidSignature in the following cases:\n      # - the header does not match the expected format\n      # - no signatures found with the expected scheme","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/flippercloud/flipper/blob/1f86de3ec91521585b156445e156642938b19cb0/lib/flipper/cloud/message_verifier.rb#L5-L41","documentation":"Error \"version should be a string\" thrown in flippercloud/flipper.","triggerScenarios":"Thrown at lib/flipper/cloud/message_verifier.rb:23 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the signature version as a String (e.g. 'v1'), matching the version prefix in the signature header","Use the default version by not overriding it, or set it to the string documented for your Flipper Cloud webhooks","Do not pass a Symbol or Integer for the version option"],"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"}