diff options
Diffstat (limited to 'lib/mattermost/client.rb')
-rw-r--r-- | lib/mattermost/client.rb | 4 |
1 files changed, 2 insertions, 2 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 |