diff options
author | Vijay Pai <vpai@google.com> | 2016-08-30 20:50:43 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2016-08-30 20:50:43 -0700 |
commit | 84033b1f6b34edd464be22967f23de6d07bf4316 (patch) | |
tree | b718ea6e4b231d033c53fd71d0ab24a98e9e4db5 | |
parent | 3703ece81b236356094a1f23da1f69af48d7aa84 (diff) |
Stick to StatusCode::INTERNAL when there's no service
response on a StreamedUnary
-rw-r--r-- | include/grpc++/impl/codegen/method_handler_impl.h | 4 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/status_code_enum.h | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index 170852606f..3f25b546da 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -194,8 +194,8 @@ class TemplatedBidiStreamingHandler : public MethodHandler { if (write_needed_ && status.ok()) { // If we needed a write but never did one, we need to mark the // status as a fail - status = Status(IMPROPER_IMPLEMENTATION, - "Service did not provide response message"); + status = Status(StatusCode::INTERNAL, + "Service did not provide response message"); } } ops.ServerSendStatus(param.server_context->trailing_metadata_, status); diff --git a/include/grpc++/impl/codegen/status_code_enum.h b/include/grpc++/impl/codegen/status_code_enum.h index 0f18a22c36..9a90a18e2a 100644 --- a/include/grpc++/impl/codegen/status_code_enum.h +++ b/include/grpc++/impl/codegen/status_code_enum.h @@ -143,11 +143,6 @@ enum StatusCode { /// Unrecoverable data loss or corruption. DATA_LOSS = 15, - // Service was improperly implemented, violated a gRPC API requirement - // Not quite the same as unimplemented since it could just be that the API - // requirement was violated in this particular circumstance - IMPROPER_IMPLEMENTATION = 16, - /// Force users to include a default branch: DO_NOT_USE = -1 }; |