Smartling / api-sdk-ruby

SDK for integrating with the Smartling API. The Smartling API allows developers to upload language specific resource files and download the translations of those files for easy integration within their application.
http://docs.smartling.com
Other
13 stars 15 forks source link

Fix invalid calls to format_api_error #13

Closed therealbnut closed 7 years ago

therealbnut commented 7 years ago

Calls like this cause a crash because format_api_error expects a res:

- format_api_error(res.body) 
+ format_api_error(res) 

Context:

def format_api_error(res)
  begin
    body = MultiJson.decode(res.body)
  rescue
  end
  ...
end