Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /lib/mattermost
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
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)