Skip to content

Cardinality violations should use error code “unimplemented” #7286

Open
1 of 1 issue completed
Open
@jhump

Description

@jhump

The gRPC docs for error codes state that both client and server should use the unimplemented code for cardinality violations. See table at the bottom of this doc (you can search for “cardinality violation” in the doc): https://grpc.github.io/grpc/core/md_doc_statuscodes.html.

A cardinality violation is when a stream contains an incorrect number of messages. Specifically, when a response stream for a unary or client-stream RPC contains zero messages with an OK status or more than one message; or when a request stream for a unary or server-stream RPC contains zero or more than one messages.

The client and server in this Go module both return an unknown error in this situation instead of unimplemented.

Sub-issues

Metadata

Metadata

Assignees

Labels

Area: RPC FeaturesIncludes Compression, Encoding, Attributes/Metadata, Interceptors.Type: Bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions