You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2021/01/21 13:40:02 UTC
[jira] [Commented] (CAMEL-16068) Camel-AWS2-S3: Fix condition for
throwing exception in case bucket does not exist
[ https://issues.apache.org/jira/browse/CAMEL-16068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17269311#comment-17269311 ]
Andrea Cosentino commented on CAMEL-16068:
------------------------------------------
Looking at this better, the problem is how we are looking for the error too, we need to look for ase.awsErrorDetails().sdkHttpResponse().statusCode() the getCode method return NoSuchBucket, so it's a bit more work. I'm doing it.
> Camel-AWS2-S3: Fix condition for throwing exception in case bucket does not exist
> ---------------------------------------------------------------------------------
>
> Key: CAMEL-16068
> URL: https://issues.apache.org/jira/browse/CAMEL-16068
> Project: Camel
> Issue Type: Bug
> Components: camel-aws2
> Affects Versions: 3.7.0
> Environment: camel-aws2-s3:3.7.0
> Reporter: fly
> Assignee: Andrea Cosentino
> Priority: Minor
>
> Wrong code on line 119:
> ```
> if (ase.awsErrorDetails().errorCode().equalsIgnoreCase("404")) {
> throw ase;
> }
>
> Correct writing method:
> ```
> if (!ase.awsErrorDetails().errorCode().equalsIgnoreCase("404")) {
> throw ase;
> }
> There are similar bugs elsewhere
--
This message was sent by Atlassian Jira
(v8.3.4#803005)