class Google::Cloud::Error

def metadata

@returns [Object, nil]

over gRPC.
This is typically present on errors originating from calls to an API

object, if both are present. Otherwise returns `nil`.
Returns the value of `metadata` from the underlying cause error
#
def metadata
  return nil unless cause && cause.respond_to?(:metadata)
  cause.metadata
end