You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API-layer:
1. If the user sets a status code outside the bounds defined in the `codes`
package 0-16 (inclusive), set the status code to `codes.Unknown`. This
impacts statuses created locally as well as statuses received in RPC
response trailers. See grpc/grpc-java#10568 for
evidence this may be happening in the wild.
Client-side:
1. When receiving a `grpc-status-details-bin` trailer:
- If there is 1 value and it deserializes into a `google.rpc.Status`, ensure
the code field matches the `grpc-status` header's code. If it does not
match, convert the code to `codes.Internal` and set a message indicating
the mismatch. If it does, the status will contain the full details of the
`grpc-status-details-bin` proto. (Note that `grpc-message` will not be
checked against the proto's message field, and will be silently discarded
if there is a mismatch.)
- Otherwise, the status returned to the application will use the
`grpc-status` and `grpc-message` values only.
- In all cases, the raw `grpc-status-details-bin` trailer will be visible to
the application via
`metadata.FromIncomingContext(ctx)["grpc-status-details-bin"]`.
Server-side:
1. If the user manually sets `grpc-status-details-bin` in the trailers:
- If the status returned by the method handler _does not_ include details
(see `status.(*Status).WithDetails`), the transport will send the user's
`grpc-status-details-bin` trailer(s) directly.
- If the status returned by the method handler _does_ include details, the
transport will disregard the user's trailer(s) and replace them with a
`google.rpc.Status` proto version of the returned status.
0 commit comments