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 2020/02/21 10:54:41 UTC

[camel] branch master updated: Camel-AWS2-KMS: Correct the way we return errorCode

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 2428554  Camel-AWS2-KMS: Correct the way we return errorCode
2428554 is described below

commit 242855424421c3ccfc8d219041b9ed54dc176532
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 21 11:54:12 2020 +0100

    Camel-AWS2-KMS: Correct the way we return errorCode
---
 .../org/apache/camel/component/aws2/kms/KMS2Producer.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Producer.java b/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Producer.java
index 2d1610b..3caafb6 100644
--- a/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Producer.java
+++ b/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Producer.java
@@ -118,7 +118,7 @@ public class KMS2Producer extends DefaultProducer {
         try {
             result = kmsClient.listKeys(builder.build());
         } catch (AwsServiceException ase) {
-            LOG.trace("List Keys command returned the error code {}", ase.getMessage());
+            LOG.trace("List Keys command returned the error code {}", ase.awsErrorDetails().errorCode());
             throw ase;
         }
         Message message = getMessageForResponse(exchange);
@@ -135,7 +135,7 @@ public class KMS2Producer extends DefaultProducer {
         try {
             result = kmsClient.createKey(builder.build());
         } catch (AwsServiceException ase) {
-            LOG.trace("Create Key command returned the error code {}", ase.getMessage());
+            LOG.trace("Create Key command returned the error code {}", ase.awsErrorDetails().errorCode());
             throw ase;
         }
         Message message = getMessageForResponse(exchange);
@@ -154,7 +154,7 @@ public class KMS2Producer extends DefaultProducer {
         try {
             result = kmsClient.disableKey(builder.build());
         } catch (AwsServiceException ase) {
-            LOG.trace("Disable Key command returned the error code {}", ase.getMessage());
+            LOG.trace("Disable Key command returned the error code {}", ase.awsErrorDetails().errorCode());
             throw ase;
         }
         Message message = getMessageForResponse(exchange);
@@ -177,7 +177,7 @@ public class KMS2Producer extends DefaultProducer {
         try {
             result = kmsClient.scheduleKeyDeletion(builder.build());
         } catch (AwsServiceException ase) {
-            LOG.trace("Schedule Key Deletion command returned the error code {}", ase.getMessage());
+            LOG.trace("Schedule Key Deletion command returned the error code {}", ase.awsErrorDetails().errorCode());
             throw ase;
         }
         Message message = getMessageForResponse(exchange);
@@ -196,7 +196,7 @@ public class KMS2Producer extends DefaultProducer {
         try {
             result = kmsClient.describeKey(builder.build());
         } catch (AwsServiceException ase) {
-            LOG.trace("Describe Key command returned the error code {}", ase.getMessage());
+            LOG.trace("Describe Key command returned the error code {}", ase.awsErrorDetails().errorCode());
             throw ase;
         }
         Message message = getMessageForResponse(exchange);
@@ -215,7 +215,7 @@ public class KMS2Producer extends DefaultProducer {
         try {
             result = kmsClient.enableKey(builder.build());
         } catch (AwsServiceException ase) {
-            LOG.trace("Enable Key command returned the error code {}", ase.getMessage());
+            LOG.trace("Enable Key command returned the error code {}", ase.awsErrorDetails().errorCode());
             throw ase;
         }
         Message message = getMessageForResponse(exchange);