Commit 0ba3099a authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'json-gem-upgrade-legacy-toggles' into 'master'

json gem upgrade legacy toggles

See merge request gitlab-org/gitlab!31366
parents 638b7976 87d8900e
...@@ -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