summaryrefslogtreecommitdiff
path: root/lib/api/entities/bulk_imports/entity_failure.rb
blob: 56312745868843521fb15bd481ed7b1b8e3380a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module API
  module Entities
    module BulkImports
      class EntityFailure < Grape::Entity
        expose :relation
        expose :pipeline_step, as: :step
        expose :exception_message do |failure|
          ::Projects::ImportErrorFilter.filter_message(failure.exception_message.truncate(72))
        end
        expose :exception_class
        expose :correlation_id_value
        expose :created_at
        expose :pipeline_class
        expose :pipeline_step
      end
    end
  end
end