diff options
author | Evan Jones <evan.jones@bluecore.com> | 2018-01-10 10:47:48 -0500 |
---|---|---|
committer | Evan Jones <evan.jones@bluecore.com> | 2018-01-12 18:20:55 -0500 |
commit | 145b199c4ddcd5e7b985585f3e733ae5092adbbb (patch) | |
tree | 0e332fde02e80599ca97656e043643d75f9360cb /CMakeLists.txt | |
parent | 0ea629c61ec70a35075e800bc3f85651f00e746f (diff) |
python: Context.abort should fail RPC even for StatusCode.OK
grpc.ServicerContext.abort is documented to always raise an exception
to terminate the RPC. The code argument "must not be StatusCode.OK."
However, if you do pass StatusCode.OK, the RPC terminates successfully
on the client side, but returns None.
_server.py: If the user accidentally passes StatusCode.OK, treat it as
StatusCode.UNKNOWN. This is what happens if the user accidentally
passes something that is not a StatusCode instance. Additionally
set details to ''.
_metadata_code_details_test.py: update test to verify the behavior of
abort with invalid codes.
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions