summaryrefslogtreecommitdiffstats
path: root/library/cpp/neh/https.cpp
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-02-28 23:59:20 +0300
committerrobot-piglet <[email protected]>2025-03-01 00:13:10 +0300
commitb04e2faf41bf366d5f501c976bda00eb32d55660 (patch)
treef922ace378c0c471d912c33f2c0231144f898d78 /library/cpp/neh/https.cpp
parent9ba742f4d36b4a3d879b4cf8d9234165413f4a0d (diff)
Intermediate changes
commit_hash:e2da3ad430fabaa84a74178b1f2103b09ac69ae7
Diffstat (limited to 'library/cpp/neh/https.cpp')
-rw-r--r--library/cpp/neh/https.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/library/cpp/neh/https.cpp b/library/cpp/neh/https.cpp
index f1a2ec9e7e7..ece7d3cf2d1 100644
--- a/library/cpp/neh/https.cpp
+++ b/library/cpp/neh/https.cpp
@@ -1394,37 +1394,7 @@ namespace NNeh {
return;
}
- switch (*error) {
- case IRequest::TResponseError::BadRequest:
- os << HttpCodeStrEx(HttpCodes::HTTP_BAD_REQUEST);
- break;
- case IRequest::TResponseError::Forbidden:
- os << HttpCodeStrEx(HttpCodes::HTTP_FORBIDDEN);
- break;
- case IRequest::TResponseError::NotExistService:
- os << HttpCodeStrEx(HttpCodes::HTTP_NOT_FOUND);
- break;
- case IRequest::TResponseError::TooManyRequests:
- os << HttpCodeStrEx(HttpCodes::HTTP_TOO_MANY_REQUESTS);
- break;
- case IRequest::TResponseError::InternalError:
- os << HttpCodeStrEx(HttpCodes::HTTP_INTERNAL_SERVER_ERROR);
- break;
- case IRequest::TResponseError::NotImplemented:
- os << HttpCodeStrEx(HttpCodes::HTTP_NOT_IMPLEMENTED);
- break;
- case IRequest::TResponseError::BadGateway:
- os << HttpCodeStrEx(HttpCodes::HTTP_BAD_GATEWAY);
- break;
- case IRequest::TResponseError::ServiceUnavailable:
- os << HttpCodeStrEx(HttpCodes::HTTP_SERVICE_UNAVAILABLE);
- break;
- case IRequest::TResponseError::BandwidthLimitExceeded:
- os << HttpCodeStrEx(HttpCodes::HTTP_BANDWIDTH_LIMIT_EXCEEDED);
- break;
- case IRequest::TResponseError::MaxResponseError:
- ythrow yexception() << TStringBuf("unknow type of error");
- }
+ os << HttpCodeStrEx(GetHttpCode(*error));
}
public: