Is there a way to tell if Write failed because the msg is too big

29 views
Skip to first unread message

dataman

unread,
Sep 20, 2018, 10:22:49 AM9/20/18
to grpc.io

Hi all,

I am working on an async gRPC client in C++. Due to server limitations we need to cap the max send msg size in the client. When we try to send a msg which is larger than the cap, the Write (async) fails, which is as expected.

Is there a way to know that the failure is due to the msg size and not any other reason?

Thanks!

Muxi Yan

unread,
Sep 26, 2018, 2:05:44 PM9/26/18
to grpc.io
AFAIK the error detail should be included in the returned status of the call.

dataman

unread,
Sep 26, 2018, 3:17:05 PM9/26/18
to grpc.io

Thanks for the response! I am using the async Write. There is no status returned in the call to Write itself. The Next call to the completion queue has no status indication as well, except for the success/failure boolean value.

Srini Polavarapu

unread,
Oct 3, 2018, 1:56:42 PM10/3/18
to grpc.io
After the write fails, you have to call Finish() to get the status. See example here: https://grpc.io/docs/tutorials/async/helloasync-cpp.html
Reply all
Reply to author
Forward
0 new messages