summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/interface/errors.cpp
diff options
context:
space:
mode:
authorhiddenpath <[email protected]>2025-02-14 19:47:42 +0300
committerhiddenpath <[email protected]>2025-02-14 20:04:30 +0300
commit8d42d8984e251aab3f9196c672bc4464746bd324 (patch)
tree1a9bdc164fbdede01e31fae62a15413ede5a412d /yt/cpp/mapreduce/interface/errors.cpp
parentf6bd8463a063ede9cf6e2590aed326ddb8e5a786 (diff)
YT-23616: Wrap RPC errors with TErrorResponse
commit_hash:942341764b50f7cef15e1b5a473069d8af9fcc2e
Diffstat (limited to 'yt/cpp/mapreduce/interface/errors.cpp')
-rw-r--r--yt/cpp/mapreduce/interface/errors.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/interface/errors.cpp b/yt/cpp/mapreduce/interface/errors.cpp
index 0819c8ca56e..42c7466dcb5 100644
--- a/yt/cpp/mapreduce/interface/errors.cpp
+++ b/yt/cpp/mapreduce/interface/errors.cpp
@@ -285,6 +285,13 @@ TErrorResponse::TErrorResponse(int httpCode, const TString& requestId)
, RequestId_(requestId)
{ }
+TErrorResponse::TErrorResponse(TYtError error, const TString& requestId)
+ : RequestId_(requestId)
+ , Error_(std::move(error))
+{
+ Setup();
+}
+
bool TErrorResponse::IsOk() const
{
return Error_.GetCode() == 0;