class

GRPC::StatusError

Inherits Exception < Reference < Object

StatusError is raised when an RPC call fails with a non-OK gRPC status. This is the primary exception users should rescue in application code.

Example: begin reply = client.say_hello(req) rescue ex : GRPC::StatusError puts ex.code # => GRPC::StatusCode::NOT_FOUND puts ex.message # => "user not found" end

Constructors

new(status : Status, trailers : Metadata = Metadata.new, cause : Exception | Nil = nil)
Source
new(code : StatusCode, message : String = "", cause : Exception | Nil = nil)
Source

Instance methods

code
Source
message
Source
status
Source
trailers
Source