Skip to content

it should be documented that calling requestObserver.onError(...) on the client side cancels the call instead of transferring error status #8476

Closed
@morgwai

Description

@morgwai

What version of gRPC-Java are you using?

1.40.1

What is your environment?

openJdk-11 on ubuntu

What did you expect to see?

in case of bi-di methods (and probably also streaming-client-unary-server), when a client calls for example requestObserver.onError(Status.INTERNAL.withDescription("desc").asException()); the server should receive all messages scheduled for transfer by the client (with requestObserver.onNext(...)) prior to the call to requestObserver.onError(...). After that the server should receive a call to onError(...) with a Status(Runtime)Exception with identical status code (INTERNAL) and description ("desc") .

What did you see instead?

results of clients calling requestObserver.onError(...) are the same as if the call was cancelled: most recent request messages don't get transferred to the server and whatever status and description the client sets, the server always receives Status.CANCELLED and "client cancelled" description.

NOTE: It is possible, that this behavior is intended, but if so, it should be documented in onError(...)'s javadoc.

Steps to reproduce the bug

start a bi-di call on the client side, send some requests, call requestObserver.onError(Status.INTERNAL.withDescription("desc").asException());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions