{"record":{"id":"d99211e469d6ee6a","repo":"puppetlabs/puppet","slug":"inline-epp-invalid-epp-detail","errorCode":null,"errorMessage":"inline_epp(): Invalid EPP: %{detail}","messagePattern":"inline_epp\\(\\): Invalid EPP: %(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/evaluator/epp_evaluator.rb","lineNumber":19,"sourceCode":"# frozen_string_literal: true\n\n# Handler of Epp call/evaluation from the epp and inline_epp functions\n#\nclass Puppet::Pops::Evaluator::EppEvaluator\n  def self.inline_epp(scope, epp_source, template_args = nil)\n    unless epp_source.is_a?(String)\n      # TRANSLATORS 'inline_epp()' is a method name and 'epp' refers to 'Embedded Puppet (EPP) template' and should not be translated\n      raise ArgumentError, _(\"inline_epp(): the first argument must be a String with the epp source text, got a %{class_name}\") %\n                           { class_name: epp_source.class }\n    end\n\n    # Parse and validate the source\n    parser = Puppet::Pops::Parser::EvaluatingParser::EvaluatingEppParser.new\n    begin\n      result = parser.parse_string(epp_source, 'inlined-epp-text')\n    rescue Puppet::ParseError => e\n      # TRANSLATORS 'inline_epp()' is a method name and 'EPP' refers to 'Embedded Puppet (EPP) template' and should not be translated\n      raise ArgumentError, _(\"inline_epp(): Invalid EPP: %{detail}\") % { detail: e.message }\n    end\n\n    # Evaluate (and check template_args)\n    evaluate(parser, 'inline_epp', scope, false, result, template_args)\n  end\n\n  def self.epp(scope, file, env_name, template_args = nil)\n    unless file.is_a?(String)\n      # TRANSLATORS 'epp()' is a method name and should not be translated\n      raise ArgumentError, _(\"epp(): the first argument must be a String with the filename, got a %{class_name}\") % { class_name: file.class }\n    end\n\n    unless Puppet::FileSystem.exist?(file)\n      unless file =~ /\\.epp$/\n        file += \".epp\"\n      end\n    end\n","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/evaluator/epp_evaluator.rb#L1-L37","documentation":"Error \"inline_epp(): Invalid EPP: %{detail}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/evaluator/epp_evaluator.rb:19 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"}