diff options
Diffstat (limited to 'lib/mattermost/client.rb')
-rw-r--r-- | lib/mattermost/client.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mattermost/client.rb b/lib/mattermost/client.rb index 7fb959a149c..a5c1f788c68 100644 --- a/lib/mattermost/client.rb +++ b/lib/mattermost/client.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Mattermost - ClientError = Class.new(Mattermost::Error) + ClientError = Class.new(::Mattermost::Error) class Client attr_reader :user @@ -11,7 +11,7 @@ module Mattermost end def with_session(&blk) - Mattermost::Session.new(user).with_session(&blk) + ::Mattermost::Session.new(user).with_session(&blk) end private @@ -52,12 +52,12 @@ module Mattermost json_response = Gitlab::Json.parse(response.body, legacy_mode: true) unless response.success? - raise Mattermost::ClientError, json_response['message'] || 'Undefined error' + raise ::Mattermost::ClientError, json_response['message'] || 'Undefined error' end json_response rescue JSON::JSONError - raise Mattermost::ClientError, 'Cannot parse response' + raise ::Mattermost::ClientError, 'Cannot parse response' end end end |