Skip to content

async client stub: need to ignore unary response msg if status is not OK #5968

Open
@ejona86

Description

@ejona86

The future and blocking APIs wait until the close() before delivering any received message. If the status is an error they throw away the request.

if (status.isOk()) {
if (value == null) {
// No value received so mark the future as an error
responseFuture.setException(
Status.INTERNAL.withDescription("No value received for unary call")
.asRuntimeException(trailers));
}
responseFuture.set(value);
} else {
responseFuture.setException(status.asRuntimeException(trailers));
}

We need to do the same for async stub. See also grpc/grpc#12824

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions