utils/github: Raise exceptions if status code != 200 or exit code is not 0

This commit is contained in:
Gautham Goli 2018-08-15 20:57:22 +05:30
parent f1ab58abcc
commit 54033d320b

View File

@ -175,7 +175,7 @@ module GitHub
end end
begin begin
if !http_code.start_with?("2") && !status.success? if !http_code.start_with?("2") || !status.success?
raise_api_error(output, errors, http_code, headers, scopes) raise_api_error(output, errors, http_code, headers, scopes)
end end
json = JSON.parse output json = JSON.parse output