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: csv_parser_client.rb
    path of file: ./repos/sequencescape/lib
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# For communicating with the csv-parser microservice (https://github.com/sanger/csv-parser)
module CsvParserClient
  require 'uri'

  # rubocop:todo Metrics/MethodLength
  def self.get_tube_rack_scan_results(tube_rack_barcode, object_to_add_errors_to) # rubocop:todo Metrics/AbcSize
    endpoint = configatron.tube_rack_scans_microservice_url
    response = Net::HTTP.get_response(URI(endpoint + tube_rack_barcode))

    if response.body.nil?
      error_message =
        # rubocop:tod
    
  def self.get_tube_rack_scan_results(tube_rack_barcode, object_to_add_errors_to) # rubocop:todo Metrics/AbcSize
    endpoint = configatron.tube_rack_scans_microservice_url
    response = Net::HTTP.get_response(URI(endpoint + tube_rack_barcode))

    if response.body.nil?
      error_message =
        # rubocop:todo Layout/LineLength
        "Scan could not be retrieved for tube rack with barcode #{tube_rack_barcode}. Service responded with status code #{response.code}"

      # rubocop:enable Layout/LineLength
      error_message += " and message #{response.message}."
      object_to_add_errors_to.errors.add(:base, error_message)
      return nil
    end