]> git.feebdaed.xyz Git - 0xmirror/grpc-go.git/commit
transport/client: Return status code `Unknown` on malformed grpc-status (#8735)
authoreshitachandwani <59800922+eshitachandwani@users.noreply.github.com>
Wed, 3 Dec 2025 07:33:17 +0000 (13:03 +0530)
committerGitHub <noreply@github.com>
Wed, 3 Dec 2025 07:33:17 +0000 (13:03 +0530)
commiteef7ca44affd5bb845b87712fc490472bfade908
treeb963dda25f447667bb956479261bd2dcc52835b5
parente14b27c228d1f23e90ebea4c74f7b02dc70e74d7
transport/client: Return status code `Unknown` on malformed grpc-status (#8735)

Fixes : https://github.com/grpc/grpc-go/issues/8713

Unknown is defined as follows in
[grpc/grpc@master/doc/statuscodes.md](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)

```
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.
```
It also mentions of returning Unknown for parsing errors in the table in
the above doc.

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

RELEASE NOTES:
* transport/client : Return status code `Unknown` on malformed
grpc-status.
internal/transport/http2_client.go
internal/transport/transport_test.go
test/http_header_end2end_test.go