summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/http/http.cpp
diff options
context:
space:
mode:
authorhiddenpath <[email protected]>2025-02-20 21:03:03 +0300
committerhiddenpath <[email protected]>2025-02-20 22:13:49 +0300
commit2514a84c15eb175f940385fb8e109d8330827b8b (patch)
tree80d7ec158812c7ae68b34a8df1f5f193eec9e11b /yt/cpp/mapreduce/http/http.cpp
parent26aea1d6bd2c2d51b8ba765beab156218ee64c19 (diff)
, YT-24294: Fix retry of 503 http code error without X-Yt-Error
commit_hash:a79152834c521c5dfea79b8a0b1af221078fb108
Diffstat (limited to 'yt/cpp/mapreduce/http/http.cpp')
-rw-r--r--yt/cpp/mapreduce/http/http.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/yt/cpp/mapreduce/http/http.cpp b/yt/cpp/mapreduce/http/http.cpp
index 47b9859605a..ae84926a2f3 100644
--- a/yt/cpp/mapreduce/http/http.cpp
+++ b/yt/cpp/mapreduce/http/http.cpp
@@ -783,6 +783,10 @@ THttpResponse::THttpResponse(
logAndSetError(NClusterErrorCodes::NRpc::Unavailable, ::TStringBuilder() << "internal error in proxy " << Context_.HostName);
break;
+ case 503:
+ logAndSetError(NClusterErrorCodes::NBus::TransportError, "service unavailable");
+ break;
+
default: {
TStringStream httpHeaders;
httpHeaders << "HTTP headers (";
@@ -801,9 +805,6 @@ THttpResponse::THttpResponse(
if (auto parsedResponse = ParseError(HttpInput_->Headers())) {
ErrorResponse_ = parsedResponse.GetRef();
- if (HttpCode_ == 503) {
- ExtendGenericError(*ErrorResponse_, NClusterErrorCodes::NBus::TransportError, "transport error");
- }
} else {
ErrorResponse_ = TErrorResponse(TYtError(errorString + " - X-YT-Error is missing in headers"), Context_.RequestId);
}