debian-mirror-gitlab/lib/gitlab/utils/error_message.rb

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

20 lines
345 B
Ruby
Raw Normal View History

2023-05-27 22:25:52 +05:30
# frozen_string_literal: true
module Gitlab
module Utils
module ErrorMessage
extend self
2023-06-20 00:43:36 +05:30
UF_ERROR_PREFIX = 'UF'
2023-05-27 22:25:52 +05:30
def to_user_facing(message)
2023-06-20 00:43:36 +05:30
prefixed_error_message(message, UF_ERROR_PREFIX)
end
def prefixed_error_message(message, prefix)
"#{prefix}: #{message}"
2023-05-27 22:25:52 +05:30
end
end
end
end