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
It is possible for gRPC responses to both have a code set to something that is not OK, and still have a response. For example, the following Python server code will return that payload, using the official gRPC implementation:
On the wire, this returns first the correctly serialized response object, then a headers block with grpc-status: 10 and grpc-message: error details.
When using grpc-web with this end point, the client calls the callback TWICE: First with the response message, then a second time with the error. The official NodeJS client, and the other gRPC clients I've tried this with, treat this as a gRPC error, and ignore the response message.
The text was updated successfully, but these errors were encountered:
Having this issue with a grpc-web implementation also. Means client-side callbacks are getting called with response and error. The data sent down the wire includes a bogus response followed by an error. Python server-side also.
As a followup, once we identified that the issue we were having was because of this double-messaging thing, we dropped into the server side and made sure that context.abort(code, details) was called server-side, rather than setting the code and responding like above. The python documentation for abort is here:
This should be fixed by #847 and #858 in version 1.2.0. Now the callbacks behavior should align with the grpc-node implementations. A response with a non-OK status will be treated as an error. The response will not be returned to align with other grpc client implementations.
It is possible for gRPC responses to both have a code set to something that is not
OK
, and still have a response. For example, the following Python server code will return that payload, using the official gRPC implementation:On the wire, this returns first the correctly serialized response object, then a headers block with
grpc-status: 10
andgrpc-message: error details
.When using grpc-web with this end point, the client calls the callback TWICE: First with the response message, then a second time with the error. The official NodeJS client, and the other gRPC clients I've tried this with, treat this as a gRPC error, and ignore the response message.
The text was updated successfully, but these errors were encountered: