You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jonasarilho and I are working on a service with a client-side streaming RPC. We noticed that grpc-gateway does not handle correctly errors that occur before it is done processing the request body. For instance:
The gateway receives a request that will result in an UNAUTHENTICATED status from the back-end service, because of invalid credentials that will be forwarded via metadata.
The back-end service receives the RPC call and returns the expected status.
If the gateway is not done processing the request, the generated code calls stream.Send, which returns io.EOF, as described in the docs.
The returned io.EOF results in a 500 status, instead of a 401.
We believe that adding a verification for io.EOF on the generated code template should fix this issue:
TIL we support client side streaming. Cool! This suggestion sounds good to me. Please feel free to open a PR, but we'll probably want to add some tests here as well. I think it'd be cool to add something to the integration tests. What do you think?
@jonasarilho and I are working on a service with a client-side streaming RPC. We noticed that grpc-gateway does not handle correctly errors that occur before it is done processing the request body. For instance:
stream.Send
, which returnsio.EOF
, as described in the docs.io.EOF
results in a500
status, instead of a401
.We believe that adding a verification for
io.EOF
on the generated code template should fix this issue:Is this solution in the right direction? Since this would be our first contribution, we appreciate help to turn this into a PR.
Thanks
The text was updated successfully, but these errors were encountered: