From 554b94bd48efe637ce7e811eccde270698187cc9 Mon Sep 17 00:00:00 2001 From: Amit Dutta Date: Tue, 7 Jan 2025 18:00:35 -0800 Subject: [PATCH] [native] Improve an error message. --- presto-native-execution/presto_cpp/main/http/HttpClient.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/presto-native-execution/presto_cpp/main/http/HttpClient.cpp b/presto-native-execution/presto_cpp/main/http/HttpClient.cpp index e8efd1896c99..e6a7427d62dd 100644 --- a/presto-native-execution/presto_cpp/main/http/HttpClient.cpp +++ b/presto-native-execution/presto_cpp/main/http/HttpClient.cpp @@ -168,11 +168,7 @@ HttpResponse::nextAllocationSize(uint64_t dataLength) const { } std::string HttpResponse::dumpBodyChain() const { - std::string responseBody; - if (!bodyChain_.empty()) { - responseBody = util::extractMessageBody(bodyChain_); - } - return responseBody; + return bodyChain_.empty() ? "Empty response" : util::extractMessageBody(bodyChain_); } class ResponseHandler : public proxygen::HTTPTransactionHandler {