You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: add_parser.rb
    path of file: ./repos/vets-api/lib/mpi/responses
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'sentry_logging'
require_relative 'parser_base'
require 'identity/parsers/gc_ids'

module MPI
  module Responses
    # Parses an MVI response and returns an MviProfile
    class AddParser < ParserBase
      include SentryLogging
      include Identity::Parsers::GCIds

      ACKNOWLEDGEMENT_DETAIL_CODE_XPATH = 'acknowledgement/acknowledgementDetail/code'
      ACKNOWLEDGEMENT_DETAIL_TEXT_XPATH = 'acknowledgement/acknowledgementDetail/t
    
      def error_details(mpi_codes)
        error_details = {
          ack_detail_code: @code,
          id_extension: locate_element(@original_body, ACKNOWLEDGEMENT_TARGET_MESSAGE_ID_EXTENSION_XPATH),
          error_texts: []
        }
        error_text_nodes = locate_elements(@original_body, ACKNOWLEDGEMENT_DETAIL_TEXT_XPATH)
        if error_text_nodes.nil?
          error_details[:error_texts] = error_text_nodes
        else
          error_text_nodes.each do |node|
            error_text = node.text || node&.nodes&.first&.value
            error_details[:error_texts].append(error_text) unless error_details[:error_texts].include?(error_text)
          end
        end