Method: GoogleRpcStatusTestService#an_rpc

Defined in:
src/ruby/spec/google_rpc_status_utils_spec.rb

#an_rpc(_, _) ⇒ Object

[View source]

127
128
129
130
131
132
133
134
135
136
# File 'src/ruby/spec/google_rpc_status_utils_spec.rb', line 127

def an_rpc(_, _)
  # TODO: create a server-side utility API for sending a google rpc status.
  # Applications are not expected to set the grpc-status-details-bin
  # ("grpc"-fixed and reserved for library use) manually.
  # Doing so here is only for testing of the client-side api for extracting
  # a google rpc status, which is useful
  # when the interacting with a server that does fill in this trailer.
  fail GRPC::Unknown.new('test message',
                         'grpc-status-details-bin' => @encoded_rpc_status)
end