View Source GRPC.RPCError exception (grpc v0.5.0)

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

@type 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
@spec exception(GRPC.Status.t(), String.t()) :: t()