File: README.md

package info (click to toggle)
grpc 1.51.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,144 kB
  • sloc: cpp: 361,866; python: 72,206; ansic: 37,778; objc: 12,434; ruby: 11,521; sh: 7,652; php: 7,615; makefile: 3,481; xml: 3,246; cs: 1,836; javascript: 1,614; java: 465; pascal: 227; awk: 132
file content (25 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Errors and Cancelletion code samples for grpc-ruby

The examples in this directory show use of grpc errors.

On the server side, errors are returned from service
implementations by raising a certain `GRPC::BadStatus` exception.

On the client side, GRPC errors get raised when either:
 * the call completes (unary and client-streaming call types)
 * the response `Enumerable` is iterated through (server-streaming and
   bidi call types).

## To run the examples here:

Start the server:

```
> ruby error_examples_server.rb
```

Then run the client:

```
> ruby error_examples_client.rb
```