• Home
Name Date Size #Lines LOC

..--

README.mdD03-May-2024594 2617

error_examples_client.rbD03-May-20242.6 KiB10365

error_examples_server.rbD03-May-20241.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