Files
Can Guler 25de51fc02 example: errors (#2534)
* Adds readme.

* Fills readme.

* Adds readme.

* Moves error examples.

* Adds port flag.

* Changes the flag for clients.

* Adds package comments.
2018-12-21 16:55:49 -08:00

26 lines
467 B
Markdown

# Description
This example demonstrates the use of status details in grpc errors.
# Run the sample code
Run the server:
```sh
$ go run ./server/main.go
```
Then run the client in another terminal:
```sh
$ go run ./client/main.go
```
It should succeed and print the greeting it received from the server.
Then run the client again:
```sh
$ go run ./client/main.go
```
This time, it should fail by printing error status details that it received from the server.