Status ServerConnectionImpl::sendProtocolError(absl::string_view details) {
  // We do this here because we may get a protocol error before we have a logical stream.
  if (active_request_ == nullptr) {
    RETURN_IF_ERROR(onMessageBegin());
  }
  ASSERT(active_request_);

  active_request_->response_encoder_.setDetails(details);
  if (!active_request_->response_encoder_.startedResponse()) {
    active_request_->request_decoder_->sendLocalReply(
        error_code_, CodeUtility::toString(error_code_), nullptr, absl::nullopt, details);
  }
  return okStatus();
}
Status ServerConnectionImpl::sendProtocolError(absl::string_view details) {
   
  if (active_request_ == nullptr) {
    RETURN_IF_ERROR(onMessageBegin());
  }
  ASSERT(active_request_);

  active_request_->response_encoder_.setDetails(details);
  if (!active_request_->response_encoder_.startedResponse()) {
    active_request_->request_decoder_->sendLocalReply(
        error_code_, CodeUtility::toString(error_code_), nullptr, absl::nullopt, details);
  }
  return okStatus();
}