summaryrefslogtreecommitdiff
path: root/lib/mattermost
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-04 15:10:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-04 15:10:36 +0000
commitbe4b3134a282f7a8812306777abd2d3150deecdc (patch)
tree0563327ce590b415047686c6feff43496742b49a /lib/mattermost
parent998adcc422d4161515bf2960ef4dce71258f69a3 (diff)
downloadgitlab-ce-be4b3134a282f7a8812306777abd2d3150deecdc.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/mattermost')
-rw-r--r--lib/mattermost/client.rb4
-rw-r--r--lib/mattermost/session.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/mattermost/client.rb b/lib/mattermost/client.rb
index a9551ffbd30..7fb959a149c 100644
--- a/lib/mattermost/client.rb
+++ b/lib/mattermost/client.rb
@@ -52,12 +52,12 @@ module Mattermost
json_response = Gitlab::Json.parse(response.body, legacy_mode: true)
unless response.success?
- raise Mattermost::ClientError.new(json_response['message'] || 'Undefined error')
+ raise Mattermost::ClientError, json_response['message'] || 'Undefined error'
end
json_response
rescue JSON::JSONError
- raise Mattermost::ClientError.new('Cannot parse response')
+ raise Mattermost::ClientError, 'Cannot parse response'
end
end
end
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb
index b349b46dc18..523d82f9161 100644
--- a/lib/mattermost/session.rb
+++ b/lib/mattermost/session.rb
@@ -174,9 +174,9 @@ module Mattermost
def handle_exceptions
yield
rescue Gitlab::HTTP::Error => e
- raise Mattermost::ConnectionError.new(e.message)
+ raise Mattermost::ConnectionError, e.message
rescue Errno::ECONNREFUSED => e
- raise Mattermost::ConnectionError.new(e.message)
+ raise Mattermost::ConnectionError, e.message
end
def parse_cookie(response)