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
|