From 84033b1f6b34edd464be22967f23de6d07bf4316 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 30 Aug 2016 20:50:43 -0700 Subject: Stick to StatusCode::INTERNAL when there's no service response on a StreamedUnary --- include/grpc++/impl/codegen/method_handler_impl.h | 4 ++-- 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 }; -- cgit v1.2.3