Stick to StatusCode::INTERNAL when there's no service

response on a StreamedUnary
pull/7018/head
Vijay Pai 9 years ago
parent 3703ece81b
commit 84033b1f6b
  1. 4
      include/grpc++/impl/codegen/method_handler_impl.h
  2. 5
      include/grpc++/impl/codegen/status_code_enum.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);

@ -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
};

Loading…
Cancel
Save