Browse Source

Text of the DescribePath error has been improved (#8868)

Oleg Doronin 6 months ago
parent
commit
dd142f69a1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ydb/library/yql/providers/pq/gateway/native/yql_pq_session.cpp

+ 2 - 2
ydb/library/yql/providers/pq/gateway/native/yql_pq_session.cpp

@@ -85,10 +85,10 @@ NPq::NConfigurationManager::TAsyncDescribePathResult TPqSession::DescribePath(co
             return client->DescribePath(path);
         }
 
-        return GetYdbPqClient(cluster, database, *config, credentialsProviderFactory).DescribeTopic(path).Apply([cluster, path](const NYdb::NTopic::TAsyncDescribeTopicResult& describeTopicResultFuture) {
+        return GetYdbPqClient(cluster, database, *config, credentialsProviderFactory).DescribeTopic(path).Apply([cluster, path, database](const NYdb::NTopic::TAsyncDescribeTopicResult& describeTopicResultFuture) {
             const NYdb::NTopic::TDescribeTopicResult& describeTopicResult = describeTopicResultFuture.GetValue();
             if (!describeTopicResult.IsSuccess()) {
-                throw yexception() << "Failed to describe topic `" << cluster << "`.`" << path << "`: " << describeTopicResult.GetIssues().ToString();
+                throw yexception() << "Failed to describe topic `" << cluster << "`.`" << path << "` in the database `" << database << "`: " << describeTopicResult.GetIssues().ToString();
             }
             NPq::NConfigurationManager::TTopicDescription desc(path);
             desc.PartitionsCount = describeTopicResult.GetTopicDescription().GetTotalPartitionsCount();