Because writing good documentation is time-consuming :)   At the time I 
joined the gRPC team, there was an HTTP RFC in the works for standardizing 
on a JSON error format (it didn't pan out).  Some of the original authors 
were exploring using it, and defining conversions between Googles own types 
and the "standard"-to-be.

I wouldn't mind publishing *my* experience error handling (and I do have a 
lot), but it's a higher bar to speak on behalf of the rest of the team.  
There are some big issues that have answers that go either way:

1.  Should gRPC use HTTP error codes in addition to the one from the 
status?  Some of them seem easy enough to write (UNIMPLEMENTED -> 404). 
Some are more difficult (UNKNOWN -> ??   500?  )  
2.  What should happen with packed error values in google.rpc.Status?  
 Should they be expanded into HTTP fields?    Should they remain in the 
proto so processors can skip parsing?  

Those are the two I know of of the top of my head, and there's a bunch of 
sub problems in that space that you can see gRPC *did* take a stance on 
(like inner error codes and messages matching the encapsulating message's 
error codes).   Reasonable people could go either way on several of these 
issues, and different environments will bias people's answers.  (If you 
work in Go exclusively, you might think stack traces in errors are 
wasteful, if you work in Java, you might be more accepting).


I am not sure this stuff answers your question.   I really wish the gRPC 
had a mini design series talking about the technical decisions we have made 
over the years.  But as I started with: writing takes time.


On Wednesday, May 29, 2019 at 9:57:39 PM UTC-7, Chris Toomey wrote:
>
> Why the reluctance to publish guidance on this key aspect of gRPC API 
> design?
>
> Has anybody besides Google built a gRPC/protobuf API that provides rich 
> error reporting? How did you implement it, and would you have benefitted 
> from some published guidance when you started?
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/f36ae8f4-a934-41bd-89f9-552445c41093%40googlegroups.com.

Reply via email to