PR comments

This commit is contained in:
Chris 2019-06-04 23:04:51 -07:00
parent f96f0d0152
commit 995c17ca06
1 changed files with 10 additions and 7 deletions

View File

@ -26,10 +26,9 @@ the gRPC data format (whether protocol buffers or something else). You
may have noticed that it's quite limited and doesn't include the may have noticed that it's quite limited and doesn't include the
ability to communicate error details. ability to communicate error details.
If you're using protocol buffers as your data format, however, many of If you're using protocol buffers as your data format, however, you may
the [gRPC language libraries](https://grpc.io/docs/reference/) now wish to consider using the the richer error model developed and used
provide experimental support for the richer error model developed and by Google as described
used by Google as described
[here](https://cloud.google.com/apis/design/errors#error_model). This [here](https://cloud.google.com/apis/design/errors#error_model). This
model enables servers to return and clients to consume additional model enables servers to return and clients to consume additional
error details expressed as one or more protobuf messages. It further error details expressed as one or more protobuf messages. It further
@ -40,9 +39,13 @@ violations, and stack traces). The protobuf binary encoding of this
extra error information is provided as trailing metadata in the extra error information is provided as trailing metadata in the
response. response.
**TODO: this [SO post](https://stackoverflow.com/a/48750825) states This richer error model is already supported in the C++, Go, Java,
that "Support is coming to each language to handle the type". What can Python, and Ruby libraries, and at least the grpc-web and Node.js
be said here about that commitment and status/timeline?** libraries have open issues requesting it. Other language libraries may
add support in the future if there's demand, so check their github
repos if interested. Note however that the grpc-core library written
in C will not likely ever support it since it is purposely data format
agnostic.
You could use a similar approach (put error details in trailing You could use a similar approach (put error details in trailing
response metadata) if you're not using protocol buffers, but you'd response metadata) if you're not using protocol buffers, but you'd