diff options
| author | hcpp <[email protected]> | 2022-03-02 23:45:27 +0300 |
|---|---|---|
| committer | hcpp <[email protected]> | 2022-03-02 23:45:27 +0300 |
| commit | 9dc88923a3dc6a29c1decfcd3d8281f7a6a8f26b (patch) | |
| tree | 446f1be1398b5e27485ffea5db87eee78b965ce6 | |
| parent | 025421675d678abafcef510abff3e8df0d67a92a (diff) | |
pending fetcher has been fixed
ref:8254e50a9a10dba62928748b4e9e93853df5f121
| -rw-r--r-- | ydb/core/yq/libs/actors/pending_fetcher.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/ydb/core/yq/libs/actors/pending_fetcher.cpp b/ydb/core/yq/libs/actors/pending_fetcher.cpp index 20c03c9b370..fa9afa27854 100644 --- a/ydb/core/yq/libs/actors/pending_fetcher.cpp +++ b/ydb/core/yq/libs/actors/pending_fetcher.cpp @@ -269,14 +269,20 @@ private: Client .GetTask(std::move(request)) .Subscribe([actorSystem, selfId](const NThreading::TFuture<TGetTaskResult>& future) { - const auto& wrappedResult = future.GetValue(); - if (wrappedResult.IsResultSet()) { + try { + const auto& wrappedResult = future.GetValue(); + if (wrappedResult.IsResultSet()) { + actorSystem->Send(selfId, new TEvPrivate::TEvGetTaskInternalResponse( + wrappedResult.IsSuccess(), wrappedResult.GetIssues(), wrappedResult.GetResult()) + ); + } else { + actorSystem->Send(selfId, new TEvPrivate::TEvGetTaskInternalResponse( + false, TIssues{{TIssue{"grpc private api result is not set for get task call"}}}, Yq::Private::GetTaskResult{}) + ); + } + } catch (...) { actorSystem->Send(selfId, new TEvPrivate::TEvGetTaskInternalResponse( - wrappedResult.IsSuccess(), wrappedResult.GetIssues(), wrappedResult.GetResult()) - ); - } else { - actorSystem->Send(selfId, new TEvPrivate::TEvGetTaskInternalResponse( - false, TIssues{{TIssue{"grpc private api result is not set for get task call"}}}, Yq::Private::GetTaskResult{}) + false, TIssues{{TIssue{CurrentExceptionMessage()}}}, Yq::Private::GetTaskResult{}) ); } }); |
