grpc v0.3.1 GRPC.RPCError exception View Source

The RPC error raised in server side and got in client side.

# server side
raise GRPC.RPCError, status: :unknown # preferred
raise GRPC.RPCError, status: GRPC.Status.unknown, message: "error message"

# client side
{:error, error} = Your.Stub.unary_call(channel, request)

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %GRPC.RPCError{
  __exception__: term(),
  message: String.t(),
  status: GRPC.Status.t()
}

Link to this section Functions

Link to this function exception(status, message) View Source
exception(GRPC.Status.t(), String.t()) :: t()