MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / send_error

Method send_error

runners/worker/WorkerRunningRequest.cpp:176–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void WorkerRunningRequest::send_error(td::Status error) {
177 if (completed_) {
178 return;
179 }
180 LOG(WARNING) << "worker request " << proxy_request_id_.to_hex() << " failed: " << error;
181
182 auto final_info = create_final_info();
183 auto ans = cocoon::create_serialize_tl_object<cocoon_api::proxy_queryAnswerErrorEx>(
184 proxy_request_id_, error.code(), error.message().str(), 1, std::move(final_info));
185 td::actor::send_closure(runner_, &WorkerRunner::send_message_to_connection, proxy_connection_id_, std::move(ans));
186 sent_answer_ = true;
187
188 finish_request(false);
189}
190
191void WorkerRunningRequest::send_answer(td::int32 status_code, std::vector<std::pair<std::string, std::string>> headers,
192 std::string orig_payload, bool payload_is_completed) {

Callers

nothing calls this directly

Calls 1

codeMethod · 0.80

Tested by

no test coverage detected