1# Error Handling Example 2 3## Overview 4 5This example shows you how to return error from the server and 6how 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=) 28Failed. Code=3 Message=Length of `Name` should be between 1 and 10 29### Send: SayHello(name=ItsTooLongName) 30Failed. Code=3 Message=Length of `Name` should be between 1 and 10 31### Send: SayHello(name=World) 32Ok. ReplyMessage=Hello World 33``` 34