connectrpc / connect-go

The Go implementation of Connect: Protobuf RPC that works.
https://connectrpc.com
Apache License 2.0
2.76k stars 90 forks source link

conformance: client often reports "unknown" code instead of a code based on HTTP status #744

Closed jhump closed 1 month ago

jhump commented 1 month ago

If the server response includes a malformed or incomplete error JSON, the client will report an unknown error to the application layer. In particular, this happens if the code property is invalid or missing or if there are any type mismatches (for example, if the response includes something other than a string for the message property).

This contrasts with the spec (in the Unary-Response section):

When reading data from the wire, client implementations must use the HTTP-to-Connect mapping to infer a Connect error code if Bare-Message is missing or malformed.

Found by conformance tests in v1.15.0.

jhump commented 1 month ago

This bug was fixed by #702, and the fix was released in v1.16.0.