• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

README.mdD23-Nov-2023594 2617

error_examples_client.rbD23-Nov-20232.6 KiB10365

error_examples_server.rbD23-Nov-20231.9 KiB6227

README.md

1# Errors and Cancelletion code samples for grpc-ruby
2
3The examples in this directory show use of grpc errors.
4
5On the server side, errors are returned from service
6implementations by raising a certain `GRPC::BadStatus` exception.
7
8On the client side, GRPC errors get raised when either:
9 * the call completes (unary and client-streaming call types)
10 * the response `Enumerable` is iterated through (server-streaming and
11   bidi call types).
12
13## To run the examples here:
14
15Start the server:
16
17```
18> ruby error_examples_server.rb
19```
20
21Then run the client:
22
23```
24> ruby error_examples_client.rb
25```
26