| 83 | } |
| 84 | |
| 85 | void RpcContext::RespondNoCache() { |
| 86 | if (AreResultsTracked()) { |
| 87 | result_tracker_->FailAndRespond(call_->header().request_id(), |
| 88 | response_pb_); |
| 89 | } else { |
| 90 | VLOG(4) << call_->remote_method().service_name() << ": Sending RPC failure response for " |
| 91 | << call_->ToString() << ": " << SecureDebugString(*response_pb_); |
| 92 | TRACE_EVENT_ASYNC_END2("rpc_call", "RPC", this, |
| 93 | "response", pb_util::PbTracer::TracePb(*response_pb_), |
| 94 | "trace", trace()->DumpToString()); |
| 95 | // This is a bit counter intuitive, but when we get the failure but set the error on the |
| 96 | // call's response we call RespondSuccess() instead of RespondFailure(). |
| 97 | call_->RespondSuccess(*response_pb_); |
| 98 | delete this; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void RpcContext::RespondFailure(const Status &status) { |
| 103 | return RespondRpcFailure(ErrorStatusPB::ERROR_APPLICATION, status); |
nothing calls this directly
no test coverage detected