aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Gerasimov <UgnineSirdis@gmail.com>2022-02-22 00:57:47 +0300
committerVasily Gerasimov <UgnineSirdis@gmail.com>2022-02-22 00:57:47 +0300
commit168167c16a2620ff73bb537bcddc58782122eeb3 (patch)
tree13eccd27ca2fd675db023cd9e1e9af1d07ec4fb4
parenta0a6ef02503671aa106004c5c59fe75158288f9a (diff)
downloadydb-168167c16a2620ff73bb537bcddc58782122eeb3.tar.gz
YQ-863 Catch std::exception instead of yexception when getting token from credentials provider
Catch std::exception instead of yexception ref:bc0f56d7b900980190dfe30ae3553ab623d6137b
-rw-r--r--ydb/public/sdk/cpp/client/impl/ydb_internal/db_driver_state/authenticator.cpp2
-rw-r--r--ydb/public/sdk/cpp/client/impl/ydb_internal/grpc_connections/grpc_connections.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/ydb/public/sdk/cpp/client/impl/ydb_internal/db_driver_state/authenticator.cpp b/ydb/public/sdk/cpp/client/impl/ydb_internal/db_driver_state/authenticator.cpp
index f8862d4c71..4ae32981e8 100644
--- a/ydb/public/sdk/cpp/client/impl/ydb_internal/db_driver_state/authenticator.cpp
+++ b/ydb/public/sdk/cpp/client/impl/ydb_internal/db_driver_state/authenticator.cpp
@@ -17,7 +17,7 @@ grpc::Status TYdbAuthenticator::GetMetadata(
) {
try {
metadata->insert(std::make_pair(YDB_AUTH_TICKET_HEADER, CredentialsProvider_->GetAuthInfo()));
- } catch (const yexception& e) {
+ } catch (const std::exception& e) {
return grpc::Status(
grpc::StatusCode::UNAUTHENTICATED,
"Can't get Authentication info from CredentialsProvider",
diff --git a/ydb/public/sdk/cpp/client/impl/ydb_internal/grpc_connections/grpc_connections.h b/ydb/public/sdk/cpp/client/impl/ydb_internal/grpc_connections/grpc_connections.h
index bfc1b7ec38..2c310525ba 100644
--- a/ydb/public/sdk/cpp/client/impl/ydb_internal/grpc_connections/grpc_connections.h
+++ b/ydb/public/sdk/cpp/client/impl/ydb_internal/grpc_connections/grpc_connections.h
@@ -174,7 +174,7 @@ public:
if (requestSettings.UseAuth && dbState->CredentialsProvider && dbState->CredentialsProvider->IsValid()) {
try {
meta.Aux.push_back({ YDB_AUTH_TICKET_HEADER, GetAuthInfo(dbState) });
- } catch (const yexception& e) {
+ } catch (const std::exception& e) {
userResponseCb(
nullptr,
TPlainStatus(
@@ -421,7 +421,7 @@ public:
if (requestSettings.UseAuth && dbState->CredentialsProvider && dbState->CredentialsProvider->IsValid()) {
try {
meta.Aux.push_back({ YDB_AUTH_TICKET_HEADER, GetAuthInfo(dbState) });
- } catch (const yexception& e) {
+ } catch (const std::exception& e) {
responseCb(
TPlainStatus(
EStatus::CLIENT_UNAUTHENTICATED,
@@ -519,7 +519,7 @@ public:
if (requestSettings.UseAuth && dbState->CredentialsProvider && dbState->CredentialsProvider->IsValid()) {
try {
meta.Aux.push_back({ YDB_AUTH_TICKET_HEADER, GetAuthInfo(dbState) });
- } catch (const yexception& e) {
+ } catch (const std::exception& e) {
connectedCallback(
TPlainStatus(
EStatus::CLIENT_UNAUTHENTICATED,