greyp9 commented on a change in pull request #5606:
URL: https://github.com/apache/nifi/pull/5606#discussion_r773317539
##########
File path:
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/s3/AbstractS3Processor.java
##########
@@ -315,6 +318,23 @@ protected final AccessControlList createACL(final
ProcessContext context, final
return acl;
}
+ protected FlowFile extractExceptionDetails(final Exception e, final
ProcessSession session, FlowFile flowFile) {
+ flowFile = session.putAttribute(flowFile, "s3.exception",
e.getClass().getName());
+ if (e instanceof AmazonS3Exception) {
+ flowFile = putAttribute(session, flowFile, "s3.additionalDetails",
((AmazonS3Exception) e).getAdditionalDetails());
+ }
+ if (e instanceof AmazonServiceException) {
+ flowFile = putAttribute(session, flowFile, "s3.statusCode",
((AmazonServiceException) e).getStatusCode());
+ flowFile = putAttribute(session, flowFile, "s3.errorCode",
((AmazonServiceException) e).getErrorCode());
+ flowFile = putAttribute(session, flowFile, "s3.errorMessage",
((AmazonServiceException) e).getErrorMessage());
Review comment:
Sure; update pushed.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]