Commit 87d8900e authored by Robert May's avatar Robert May

Add legacy toggle to clients

parent 91dc8ac6
......@@ -163,7 +163,7 @@ module Gitlab
end
def parse_json(response_body)
Gitlab::Json.parse(response_body)
Gitlab::Json.parse(response_body, legacy_mode: true)
rescue JSON::ParserError
raise PrometheusClient::Error, 'Parsing response failed'
end
......
......@@ -49,7 +49,7 @@ module Mattermost
end
def json_response(response)
json_response = Gitlab::Json.parse(response.body)
json_response = Gitlab::Json.parse(response.body, legacy_mode: true)
unless response.success?
raise Mattermost::ClientError.new(json_response['message'] || 'Undefined error')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment