diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /lib/mattermost | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) | |
download | gitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz |
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.rb | 4 | ||||
-rw-r--r-- | lib/mattermost/session.rb | 4 |
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) |