summaryrefslogtreecommitdiff
path: root/lib/mattermost
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-20 23:17:32 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-12-20 23:17:32 +0100
commit22a0567823e792bd760ced79539a0b2c4bfd8f5e (patch)
tree8de6dfef6ea19ca18dcdbdd736ec48f21b02a198 /lib/mattermost
parent70dcd45de207992b77b23175d7ed9e4643342f72 (diff)
downloadgitlab-ce-22a0567823e792bd760ced79539a0b2c4bfd8f5e.tar.gz
Fix a few error messages
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 fa3c9fa27bd..ec2903b7ec6 100644
--- a/lib/mattermost/client.rb
+++ b/lib/mattermost/client.rb
@@ -30,12 +30,12 @@ module Mattermost
json_response = JSON.parse(response.body)
unless response.success?
- raise ClientError(json_response['message'] || 'Undefined error')
+ raise Mattermost::ClientError.new(json_response['message'] || 'Undefined error')
end
json_response
rescue JSON::JSONError
- raise ClientError('Cannot parse response')
+ raise Mattermost::ClientError.new('Cannot parse response')
end
end
end
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb
index 8fcd4a84af5..ddfeb88a71f 100644
--- a/lib/mattermost/session.rb
+++ b/lib/mattermost/session.rb
@@ -81,9 +81,9 @@ module Mattermost
def post(path, options = {})
self.class.post(path, options.merge(headers: @headers))
rescue HTTParty::Error => e
- raise ConnectionError(e.message)
+ raise Mattermost::ConnectionError.new(e.message)
rescue Errno::ECONNREFUSED
- raise ConnectionError
+ raise Mattermost::ConnectionError.new(e.message)
end
private