This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 45a8194034091cb875ccd6234102d81638b7a733 Author: Andrea Cosentino <[email protected]> AuthorDate: Fri Mar 4 08:40:45 2022 +0100 CAMEL-17739 - Camel Google Secret Manager Properties Source: Support the usage of client default instance --- .../google/secret/manager/GoogleSecretManagerPropertiesFunction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerPropertiesFunction.java b/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerPropertiesFunction.java index 59b0ec8..b5d7a6a 100644 --- a/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerPropertiesFunction.java +++ b/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerPropertiesFunction.java @@ -22,13 +22,13 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.api.gax.rpc.ApiException; import com.google.auth.Credentials; import com.google.auth.oauth2.ServiceAccountCredentials; import com.google.cloud.secretmanager.v1.AccessSecretVersionResponse; import com.google.cloud.secretmanager.v1.SecretManagerServiceClient; import com.google.cloud.secretmanager.v1.SecretManagerServiceSettings; import com.google.cloud.secretmanager.v1.SecretVersionName; -import io.grpc.StatusRuntimeException; import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.RuntimeCamelException; @@ -176,7 +176,7 @@ public class GoogleSecretManagerPropertiesFunction extends ServiceSupport implem if (ObjectHelper.isEmpty(returnValue)) { returnValue = defaultValue; } - } catch (StatusRuntimeException ex) { + } catch (ApiException ex) { if (ObjectHelper.isNotEmpty(defaultValue)) { returnValue = defaultValue; } else {
