diff options
| author | hiddenpath <[email protected]> | 2025-02-14 19:47:42 +0300 |
|---|---|---|
| committer | hiddenpath <[email protected]> | 2025-02-14 20:04:30 +0300 |
| commit | 8d42d8984e251aab3f9196c672bc4464746bd324 (patch) | |
| tree | 1a9bdc164fbdede01e31fae62a15413ede5a412d /yt/cpp/mapreduce/interface/errors.cpp | |
| parent | f6bd8463a063ede9cf6e2590aed326ddb8e5a786 (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.cpp | 7 |
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; |
