• Home
Name Date Size #Lines LOC

..--

BUILDD06-Sep-20241.5 KiB4642

CMakeLists.txtD06-Sep-20244 KiB114103

README.mdD06-Sep-2024679 3423

greeter_client.ccD06-Sep-20244.5 KiB14097

greeter_server.ccD06-Sep-20244.1 KiB11879

README.md

1# Error Details Example
2
3## Overview
4
5This example shows you how to return error with details from the server
6and how to handle it on the client.
7
8### Try it!
9
10Once you have working gRPC, you can build this example using either bazel or cmake.
11
12Run the server, which will listen on port 50051:
13
14```sh
15$ ./greeter_server
16```
17
18Run the client (in a different terminal):
19
20```sh
21$ ./greeter_client
22```
23
24If things go smoothly, you will see the client output:
25
26```
27### Send: SayHello(name=World)
28Ok. ReplyMessage=Hello World
29### Send: SayHello(name=World)
30Failed. Code=8 Message=Request limit exceeded
31Details:
32- Quota: subject=name: World description=Limit one greeting per person
33```
34