summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/interface/errors.cpp
diff options
context:
space:
mode:
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;