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

Add legacy toggle to clients

parent 91dc8ac6
...@@ -163,7 +163,7 @@ module Gitlab ...@@ -163,7 +163,7 @@ module Gitlab
end end
def parse_json(response_body) def parse_json(response_body)
Gitlab::Json.parse(response_body) Gitlab::Json.parse(response_body, legacy_mode: true)
rescue JSON::ParserError rescue JSON::ParserError
raise PrometheusClient::Error, 'Parsing response failed' raise PrometheusClient::Error, 'Parsing response failed'
end end
......
...@@ -49,7 +49,7 @@ module Mattermost ...@@ -49,7 +49,7 @@ module Mattermost
end end
def json_response(response) def json_response(response)
json_response = Gitlab::Json.parse(response.body) json_response = Gitlab::Json.parse(response.body, legacy_mode: true)
unless response.success? unless response.success?
raise Mattermost::ClientError.new(json_response['message'] || 'Undefined error') 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