We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f3d8d7 commit fe32fffCopy full SHA for fe32fff
doc.go
@@ -247,19 +247,11 @@ errors can still be unwrapped using the APIError.
247
log.Println(ae.Reason())
248
log.Println(ae.Details().Help.GetLinks())
249
}
250
- }
251
-
252
-If the gRPC transport was used, the [google.golang.org/grpc/status.Status] can
253
-still be parsed using the [google.golang.org/grpc/status.FromError] function.
254
255
- if err != nil {
256
- if s, ok := status.FromError(err); ok {
257
- log.Println(s.Message())
258
- for _, d := range s.Proto().Details {
259
- log.Println(d)
260
+ // If a gRPC transport was used you can extract the
+ // google.golang.org/grpc/status.Status from the error
+ s := ae.GRPCStatus()
+ log.Println(s.Code())
261
262
263
264
# Client Stability
265
0 commit comments