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