mirror of https://github.com/grpc/grpc.git
Context detail messages are Unicode strings in both the implementation and specification. Fix the documentation to make this clearer. The specification for the Status-Message response field says "Status-Message is [...] a Unicode string [...] encoded as UTF-8" [1]. The implementation seems to call _common.encode(), so anything that is UTF-8 encodable works. For example: context.set_code(grpc.StatusCode.ABORTED) context.set_details('emoji error: \U0001F600') Correctly returns a smiley face emoji to the client.pull/18414/head
parent
8c3d4a7dfd
commit
86991f633d
1 changed files with 3 additions and 3 deletions
Loading…
Reference in new issue