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/10/25 11:15:45 UTC

[camel] branch main updated: CAMEL-18643 - AWS Health Check: Use AwsServiceException instead of SdkClientException for health check - AWS Athena

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 b8790fb37b9 CAMEL-18643 - AWS Health Check: Use AwsServiceException instead of SdkClientException for health check - AWS Athena
b8790fb37b9 is described below

commit b8790fb37b9593855980a0c6c750089dcb138e9e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Oct 25 12:38:28 2022 +0200

    CAMEL-18643 - AWS Health Check: Use AwsServiceException instead of SdkClientException for health check - AWS Athena
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../camel/component/aws2/athena/Athena2ClientHealthCheck.java       | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2ClientHealthCheck.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2ClientHealthCheck.java
index 5da9df7a9c7..2c3402d4b28 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2ClientHealthCheck.java
+++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2ClientHealthCheck.java
@@ -72,6 +72,12 @@ public class Athena2ClientHealthCheck extends AbstractHealthCheck {
         } catch (AwsServiceException e) {
             builder.message(e.getMessage());
             builder.error(e);
+            if (ObjectHelper.isNotEmpty(e.statusCode())) {
+                builder.detail(SERVICE_STATUS_CODE, e.statusCode());
+            }
+            if (ObjectHelper.isNotEmpty(e.awsErrorDetails().errorCode())) {
+                builder.detail(SERVICE_ERROR_CODE, e.awsErrorDetails().errorCode());
+            }
             builder.down();
             return;