{"record":{"id":"0c44520b83db29a4","repo":"puppetlabs/puppet","slug":"actions-need-to-know-what-to-do-when-invoked-plea","errorCode":null,"errorMessage":"actions need to know what to do when_invoked; please add the block","messagePattern":"actions need to know what to do when_invoked; please add the block","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/interface/action_builder.rb","lineNumber":164,"sourceCode":"    next if setter =~ /^=/\n\n    property = setter.to_s.chomp('=')\n\n    unless method_defined? property\n      # ActionBuilder#<property> delegates to Action#<setter>\n      def_delegator :@action, setter, property\n    end\n  end\n\n  private\n\n  def initialize(face, name, &block)\n    @face   = face\n    @action = Puppet::Interface::Action.new(face, name)\n    instance_eval(&block)\n    unless @action.when_invoked\n      # TRANSLATORS 'when_invoked' is a method name and should not be translated and 'block' is a Ruby code block\n      raise ArgumentError, _(\"actions need to know what to do when_invoked; please add the block\")\n    end\n  end\nend\n","sourceCodeStart":146,"sourceCodeEnd":168,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/action_builder.rb#L146-L168","documentation":"Error \"actions need to know what to do when_invoked; please add the block\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/interface/action_builder.rb:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}