lib/google/ads/google_ads/errors.rb in google-ads-googleads-7.0.0 vs lib/google/ads/google_ads/errors.rb in google-ads-googleads-8.0.0

- old
+ new

@@ -49,10 +49,16 @@ # Return nil if not found # Return Integer: index of the error def self.index(error) path = error.location.field_path_elements.find {|elt| elt.field_name == OPERATIONS } if path - path.index.value + ret = path.index + # TODO: Once v5 is sunset, we can always just return path.index. + if ret.class == Integer + ret + else + ret.value + end else nil end end