-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grpc: Attempt to read trailers always when parsing grpc exception [DO NOT MERGE] #3185
grpc: Attempt to read trailers always when parsing grpc exception [DO NOT MERGE] #3185
Conversation
I've been notified of #3087 Actually that makes sense if body read fails, but it doesn't make sense if body is just empty so I'm not sure if this PR is worth it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Do you think you could write a test in GrpcClientTest
?
Will do 👌 |
8762bfa
to
c05473c
Compare
c05473c
to
4b53174
Compare
I tried to simulate situation that we encountered in wild but I think it doesn't go correctly through this part For some reason even when I send empty body, it successfully passes despite exception supposed to be present |
This is fundamentally not correct approach as trailers() might not be available due to how buggy okhttp library is For reference: when trailers are not ready you would get exception
|
This should prevent missing grpc-status in case of inability to read message correctly
Unless this is changed, any failure to read body will result in generic IO exception when grpc-status is in trailers