def format_errors(details)
      errors = {messages: [], details: []}

      if details && !details.key?(:finished_count)
        details.each do |step, report|
          if step == "content"
            parse_content(report, errors)
          else
            parse_generic(report, errors)
          end
        end
      end

      errors
    end
def format_errors(details)
      errors = {messages: [], details: []}

      if details && !details.key?(:finished_count)
        details.each do |step, report|
          if step == "content"
            parse_content(report, errors)
          else
            parse_generic(report, errors)
          end
        end
      end

      errors
    end
Possible formats coming from pulp

 We ignore this case:
   {'finished_count' => {}}

 We extract from this case:
   {'content' => {'error' => ''},
    'errata' => {'error' => ''},
    'packages' => {'error' => ''},
    'metadata' => {'error_details => ''}
   }