On Wed, Mar 21, 2018 at 5:57 AM, <[email protected]> wrote:

> Hope this is the right place for questions about grpc usage. Please let me
> know if stackoverflow with #grpc tag is where to go in future.
>
> I was reading https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
> which mentions that CANCELLED and DEADLINE_EXCEEDED status code can be
> raised on both client and server.
>
> However, I am not aware of a way to determine on server what has gone
> wrong.
> 1) If I try to reply (e.g. send_initial_metadata) to a call that has been
> cancelled, it seems on server I get an RpcError with no details about what
> happened
> 2) If I try to reply (e.g. send_initial_metadata) to a call that has
> exceeded deadline, it seems on server I get an RpcError with no details
> about what happened
>
> https://grpc.io/grpc/python/grpc.html doesn't even mention that
> `send_initial_metadata` can raise an RpcError.
>
> I'm not sure if I've misinterpreted the document when it says the status
> codes can be generated on both client and server, which I interpreted it to
> mean on the server I would be able to determine when call was in this state.
>
> Is there some method on the server I am missing?
>

I think perhaps some of our documentation has given you the wrong idea
about the philosophy of status codes. Status codes are intended to be
*interpreted* by invocation-side applications and *occasionally generated* by
service-side applications (at other times the service-side gRPC runtime or
the client-side gRPC runtime will generate the code *and send it in the
direction of the invocation-side application*). It is not the case that
status codes are ever sent from the invocation side of an RPC to the
service side of an RPC. It is not (to my knowledge) supported in gRPC that
the service-side application will ever learn why an RPC was aborted ("a way
to determine on server what has gone wrong"), only that the RPC was aborted
and that the application should stop the work of servicing it.
-Nathaniel

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAEOYnATT%2BGRLhsKNNYq%3D59i-rzZ%3DvHpUxg3RC_mA5t%3DJ2%2BvzZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to