diff options
Diffstat (limited to 'lib/gitlab/utils/error_message.rb')
-rw-r--r-- | lib/gitlab/utils/error_message.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/utils/error_message.rb b/lib/gitlab/utils/error_message.rb index e9c6f8a5847..72b69fb078f 100644 --- a/lib/gitlab/utils/error_message.rb +++ b/lib/gitlab/utils/error_message.rb @@ -5,8 +5,14 @@ module Gitlab module ErrorMessage extend self + UF_ERROR_PREFIX = 'UF' + def to_user_facing(message) - "UF: #{message}" + prefixed_error_message(message, UF_ERROR_PREFIX) + end + + def prefixed_error_message(message, prefix) + "#{prefix}: #{message}" end end end |