Welcome to mirror list, hosted at ThFree Co, Russian Federation.

base_service.rb « snippets « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2b450db0b83a0e82e0a69fbaab39033a5c9c0a0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Snippets
  class BaseService < ::BaseService
    private

    def snippet_error_response(snippet, http_status)
      ServiceResponse.error(
        message: snippet.errors.full_messages.to_sentence,
        http_status: http_status,
        payload: { snippet: snippet }
      )
    end
  end
end