joewitt commented on a change in pull request #3563: NIFI-6367 - more error 
handling for FetchS3Object
URL: https://github.com/apache/nifi/pull/3563#discussion_r318834551
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java
 ##########
 @@ -105,6 +107,9 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
 
         final Map<String, String> attributes = new HashMap<>();
         try (final S3Object s3Object = client.getObject(request)) {
+            if (s3Object == null) {
+                throw new IOException("AWS refused to execute this request.");
 
 Review comment:
   as a general rule intentionally throwing this to simple catch it below is 
really just using exceptions for flow control which isn't awesome as it does 
have a pretty significant impact on the performance of the jvm during stack 
generation.  that said this is something we can improve it becomes a real 
problem and it isn't like we're perfect on this regard elsehwere

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to