Exception: GRPC::BadStatus

Inherits:
StandardError
  • Object
show all
Defined in:
lib/gapic/grpc/status_details.rb

Instance Method Summary collapse

Instance Method Details

#status_detailsObject



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/gapic/grpc/status_details.rb', line 24

def status_details
  rpc_status = to_rpc_status

  return nil.to_a if rpc_status.nil?

  rpc_status.details.map do |detail|
    detail_type = Google::Protobuf::DescriptorPool.generated_pool.lookup detail.type_name
    detail = detail.unpack detail_type.msgclass if detail_type
    detail
  rescue Google::Protobuf::ParseError
    detail
  end
end