You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/03/02 07:48:46 UTC

[camel] branch main updated: CAMEL-17732 - Secrets Manager Properties Sources: if default value is provided, we should not fail with wrong credentials - AWS Secrets Manager

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


The following commit(s) were added to refs/heads/main by this push:
     new 3a38268  CAMEL-17732 - Secrets Manager Properties Sources: if default value is provided, we should not fail with wrong credentials - AWS Secrets Manager
3a38268 is described below

commit 3a382688608c17b405897adc1110a22ca5f35e0c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 2 08:28:21 2022 +0100

    CAMEL-17732 - Secrets Manager Properties Sources: if default value is provided, we should not fail with wrong credentials - AWS Secrets Manager
---
 .../aws/secretsmanager/SecretsManagerPropertiesFunction.java          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java
index a04ca59..d0cf592 100644
--- a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java
+++ b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java
@@ -37,7 +37,7 @@ import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
 import software.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilder;
 import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest;
 import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse;
-import software.amazon.awssdk.services.secretsmanager.model.ResourceNotFoundException;
+import software.amazon.awssdk.services.secretsmanager.model.SecretsManagerException;
 
 /**
  * A {@link PropertiesFunction} that lookup the property value from AWS Secrets Manager service.
@@ -188,7 +188,7 @@ public class SecretsManagerPropertiesFunction extends ServiceSupport implements
             if (ObjectHelper.isEmpty(returnValue)) {
                 returnValue = defaultValue;
             }
-        } catch (ResourceNotFoundException ex) {
+        } catch (SecretsManagerException ex) {
             if (ObjectHelper.isNotEmpty(defaultValue)) {
                 returnValue = defaultValue;
             } else {