debian-mirror-gitlab/lib/api/entities/bulk_imports/entity_failure.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
1.1 KiB
Ruby
Raw Normal View History

2021-09-30 23:02:18 +05:30
# frozen_string_literal: true
module API
module Entities
module BulkImports
class EntityFailure < Grape::Entity
2023-01-13 00:05:48 +05:30
expose :relation, documentation: { type: 'string', example: 'group' }
expose :pipeline_step, as: :step, documentation: { type: 'string', example: 'extractor' }
expose :exception_message, documentation: { type: 'string', example: 'error message' } do |failure|
2022-11-25 23:54:43 +05:30
::Projects::ImportErrorFilter.filter_message(failure.exception_message.truncate(72))
end
2023-01-13 00:05:48 +05:30
expose :exception_class, documentation: { type: 'string', example: 'Exception' }
expose :correlation_id_value, documentation: { type: 'string', example: 'dfcf583058ed4508e4c7c617bd7f0edd' }
expose :created_at, documentation: { type: 'dateTime', example: '2012-05-28T04:42:42-07:00' }
expose :pipeline_class, documentation: {
type: 'string', example: 'BulkImports::Groups::Pipelines::GroupPipeline'
}
expose :pipeline_step, documentation: { type: 'string', example: 'extractor' }
2021-09-30 23:02:18 +05:30
end
end
end
end