{"record":{"id":"784945b1b71556bd","repo":"flippercloud/flipper","slug":"write-attempted-while-in-read-only-mode","errorCode":null,"errorMessage":"write attempted while in read only mode","messagePattern":"write attempted while in read only mode","errorType":"exception","errorClass":"Flipper::Adapters::ReadOnly::WriteAttempted","httpStatus":null,"severity":"error","filePath":"lib/flipper/adapters/read_only.rb","lineNumber":22,"sourceCode":"  module Adapters\n    # Public: Adapter that wraps another adapter and raises for any writes.\n    class ReadOnly < Wrapper\n      WRITE_METHODS = %i[import add remove clear enable disable]\n\n      class WriteAttempted < Error\n        def initialize(message = nil)\n          super(message || 'write attempted while in read only mode')\n        end\n      end\n\n      def read_only?\n        true\n      end\n\n      private\n\n      def wrap(method, *args, **kwargs)\n        raise WriteAttempted if WRITE_METHODS.include?(method)\n\n        yield\n      end\n    end\n  end\nend\n","sourceCodeStart":4,"sourceCodeEnd":29,"githubUrl":"https://github.com/flippercloud/flipper/blob/1f86de3ec91521585b156445e156642938b19cb0/lib/flipper/adapters/read_only.rb#L4-L29","documentation":"Error \"write attempted while in read only mode\" thrown in flippercloud/flipper.","triggerScenarios":"Thrown at lib/flipper/adapters/read_only.rb:22 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the Flipper::Adapters::ReadOnly wrapper (or the read_only: true option) if writes are required","Perform enable/disable/import operations against the underlying writable adapter directly, not through the read-only wrapper","Use read-only mode only for processes that only check feature state (e.g. web requests) and keep writes in a separate process configured with the writable adapter"],"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"}