lib/google/cloud/translate/service.rb in google-cloud-translate-0.23.0 vs lib/google/cloud/translate/service.rb in google-cloud-translate-0.23.1
- old
+ new
@@ -176,10 +176,10 @@
def retry_http_code? response #:nodoc:
@http_codes.include? response.status
end
def retry_error_reason? response #:nodoc:
- result = JSON.parse(response.body)["data"]
+ result = JSON.parse(response.body)
if result &&
result["error"] &&
result["error"]["errors"]
Array(result["error"]["errors"]).each do |error|
if error["reason"] && @reasons.include?(error["reason"])