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

error_message.rb « utils « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 72b69fb078fcbe2d6a4f34bf8046818815ad9876 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Gitlab
  module Utils
    module ErrorMessage
      extend self

      UF_ERROR_PREFIX = 'UF'

      def to_user_facing(message)
        prefixed_error_message(message, UF_ERROR_PREFIX)
      end

      def prefixed_error_message(message, prefix)
        "#{prefix}: #{message}"
      end
    end
  end
end