summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/http/http_client.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_client.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_client.cpp')
-rw-r--r--yt/cpp/mapreduce/http/http_client.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/yt/cpp/mapreduce/http/http_client.cpp b/yt/cpp/mapreduce/http/http_client.cpp
index b22fcacb164..820bc0c36af 100644
--- a/yt/cpp/mapreduce/http/http_client.cpp
+++ b/yt/cpp/mapreduce/http/http_client.cpp
@@ -57,6 +57,9 @@ TMaybe<TErrorResponse> GetErrorResponse(const TString& hostName, const TString&
case NHttp::EStatusCode::InternalServerError:
return logAndSetError(NClusterErrorCodes::NRpc::Unavailable, "internal error in proxy " + hostName);
+ case NHttp::EStatusCode::ServiceUnavailable:
+ return logAndSetError(NClusterErrorCodes::NBus::TransportError, "service unavailable");
+
default: {
TStringStream httpHeaders;
httpHeaders << "HTTP headers (";
@@ -81,9 +84,6 @@ TMaybe<TErrorResponse> GetErrorResponse(const TString& hostName, const TString&
if (errorResponse.IsOk()) {
return Nothing();
}
- if (httpCode == NHttp::EStatusCode::ServiceUnavailable) {
- ExtendGenericError(errorResponse, NClusterErrorCodes::NBus::TransportError, "transport error");
- }
return errorResponse;
}