diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-20 23:05:59 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-20 23:05:59 +0100 |
commit | 77c96d5a1bcf5cbb895ab2fe244ba9f9bce931cb (patch) | |
tree | 2b02d60b082755ed2137ec223df9742d9cbd0a2f /lib | |
parent | 3c61b13efeb52c95d13fbb75fd3016555095276b (diff) | |
parent | 36eed726dcf7e4bf062265cb665ad798be774f89 (diff) | |
download | gitlab-ce-77c96d5a1bcf5cbb895ab2fe244ba9f9bce931cb.tar.gz |
Merge branch 'zj-mattermost-slash-config' of gitlab.com:gitlab-org/gitlab-ce into zj-mattermost-slash-config
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mattermost/client.rb | 2 | ||||
-rw-r--r-- | lib/mattermost/session.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/mattermost/client.rb b/lib/mattermost/client.rb index 6eaaed34063..fa3c9fa27bd 100644 --- a/lib/mattermost/client.rb +++ b/lib/mattermost/client.rb @@ -34,7 +34,7 @@ module Mattermost end json_response - rescue JSON::JSONError => e + rescue JSON::JSONError raise ClientError('Cannot parse response') end end diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb index 38a71061097..8f14ed306b8 100644 --- a/lib/mattermost/session.rb +++ b/lib/mattermost/session.rb @@ -75,9 +75,9 @@ module Mattermost def get(path, options = {}) self.class.get(path, options.merge(headers: @headers)) rescue HTTParty::Error => e - raise ConnectionError(e.message) + raise Mattermost::ConnectionError.new(e.message) rescue Errno::ECONNREFUSED => e - raise ConnectionError(e.message) + raise Mattermost::ConnectionError.new(e.message) end def post(path, options = {}) |