Change error code

This commit is contained in:
Nikolai Kochetov 2022-06-14 07:32:13 +00:00
parent 43dff9d34c
commit f9fa9c094f

View File

@ -65,7 +65,7 @@ public:
, log(log_) , log(log_)
{ {
if (nested_pools.empty()) if (nested_pools.empty())
throw DB::Exception(DB::ErrorCodes::LOGICAL_ERROR, "Cannot create PoolWithFailover cause nested pools are empty"); throw DB::Exception(DB::ErrorCodes::ALL_CONNECTION_TRIES_FAILED, "Cannot create PoolWithFailover cause nested pools are empty");
for (size_t i = 0;i < nested_pools.size(); ++i) for (size_t i = 0;i < nested_pools.size(); ++i)
shared_pool_states[i].config_priority = nested_pools[i]->getPriority(); shared_pool_states[i].config_priority = nested_pools[i]->getPriority();