class Google::Ads::GoogleAds::PartialFailureErrorDecoder
Public Class Methods
decode(partial_failure_error)
click to toggle source
decodes a partial_failure_error (Google::Rpc::Status instance) to an array of meaningful error protos
Return an Array of protobuf objects, typed depending on what was in the passed object (which will mostly be Google::Protobuf::Any, so the types could be any valid protobuf type)
# File lib/google/ads/google_ads/partial_failure_error_decoder.rb, line 13 def self.decode(partial_failure_error) partial_failure_error.details.select { |detail| Google::Protobuf::Any === detail }.map { |detail| type = Google::Protobuf::DescriptorPool.generated_pool.lookup( detail.type_name ).msgclass detail.unpack(type) } end