grpc-go/examples/features/errors
赵延 c44f627fd1
cleanup: replace grpc.WithInsecure with insecure.NewCredentials (#5177)
2022-02-09 11:17:46 -08:00
..
client cleanup: replace grpc.WithInsecure with insecure.NewCredentials (#5177) 2022-02-09 11:17:46 -08:00
server cmd/protoc-gen-go-grpc: revert to interface-based service registration (#3911) 2020-09-29 15:17:06 -07:00
README.md example: errors (#2534) 2018-12-21 16:55:49 -08:00

README.md

Description

This example demonstrates the use of status details in grpc errors.

Run the sample code

Run the server:

$ go run ./server/main.go

Then run the client in another terminal:

$ go run ./client/main.go

It should succeed and print the greeting it received from the server. Then run the client again:

$ go run ./client/main.go

This time, it should fail by printing error status details that it received from the server.