mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-05-22 19:51:44 +03:00
when -format-error option is used, format service reflection errors, too (#188)
This commit is contained in:
@@ -695,7 +695,11 @@ func main() {
|
||||
|
||||
err = grpcurl.InvokeRPC(ctx, descSource, cc, symbol, append(addlHeaders, rpcHeaders...), h, rf.Next)
|
||||
if err != nil {
|
||||
fail(err, "Error invoking method %q", symbol)
|
||||
if errStatus, ok := status.FromError(err); ok && *formatError {
|
||||
h.Status = errStatus
|
||||
} else {
|
||||
fail(err, "Error invoking method %q", symbol)
|
||||
}
|
||||
}
|
||||
reqSuffix := ""
|
||||
respSuffix := ""
|
||||
|
||||
Reference in New Issue
Block a user