Skip to content

Client must return gRPC status Unknown when it fails to parse the status received from the server #8713

@easwars

Description

@easwars

See: grpc/grpc@master/doc/statuscodes.md

Here Unknown is defined as follows:

Unknown error. For example, this error may be returned when a Status value received 
from another address space belongs to an error space that is not known in this 
address space. Also errors raised by APIs that do not return enough error information
may be converted to this error.

There is also a mention of returning Unknown for parsing errors in the table in the above doc.

In #8548, we added code to ignore any HTTP status received in the response from the server as we should only be looking at gRPC status. But this PR also inadvertently changed the returned gRPC status code from Unknown to Internal for missing status. This has since been reverted in #8702.

We are currently returning Internal for status parsing errors as well, which is contrary to what is mentioned in the above spec. We should change it to return Unknown as well.

Metadata

Metadata

Labels

Area: ClientIncludes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more.Type: Bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions