{"record":{"id":"01e06662118594c8","repo":"puppetlabs/puppet","slug":"unexpected-end-of-input","errorCode":null,"errorMessage":"Unexpected end of input","messagePattern":"Unexpected end of input","errorType":"exception","errorClass":"SerializationError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/serialization/json.rb","lineNumber":260,"sourceCode":"\n  class Unpacker\n    def initialize(io)\n      re_initialize(io)\n      @type_registry = {}\n      @nested = []\n    end\n\n    def re_initialize(io)\n      parsed = parse_io(io)\n      raise SerializationError, _(\"JSON stream is not an array. It is a %{klass}\") % { klass: io.class.name } unless parsed.is_a?(Array)\n\n      @etor_stack = [parsed.each]\n    end\n\n    def read\n      obj = nil\n      loop do\n        raise SerializationError, _('Unexpected end of input') if @etor_stack.empty?\n\n        etor = @etor_stack.last\n        begin\n          obj = etor.next\n          break\n        rescue StopIteration\n          @etor_stack.pop\n        end\n      end\n      if obj.is_a?(Array)\n        ext_etor = obj.each\n        @etor_stack << ext_etor\n        ext_no = ext_etor.next\n        ext_block = @type_registry[ext_no]\n        raise SerializationError, _(\"Invalid input. %{ext_no} is not a valid extension number\") % { ext_no: ext_no } if ext_block.nil?\n\n        obj = ext_block.call(nil)\n      end","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/json.rb#L242-L278","documentation":"Error \"Unexpected end of input\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/serialization/json.rb:260 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"}