Class AWSExceptionClassifierUtil


  • @Internal
    public class AWSExceptionClassifierUtil
    extends Object
    Util class to create FatalExceptionClassifier to classify AwsServiceException based on AwsErrorDetails.errorCode().
    • Constructor Detail

      • AWSExceptionClassifierUtil

        public AWSExceptionClassifierUtil()
    • Method Detail

      • withAWSServiceErrorCode

        public static org.apache.flink.connector.base.sink.throwable.FatalExceptionClassifier withAWSServiceErrorCode​(Class<? extends software.amazon.awssdk.awscore.exception.AwsServiceException> serviceExceptionType,
                                                                                                                      String errorCode,
                                                                                                                      java.util.function.Function<Throwable,​Exception> mapper)
        Creates a FatalExceptionClassifier that classifies an exception as fatal if a given exception contains an AwsServiceException of type serviceExceptionType and AwsErrorDetails.errorCode() errorCode.
        Parameters:
        serviceExceptionType - The specific AwsServiceException to look for in the exception.
        errorCode - The AwsErrorDetails.errorCode() for the passed serviceExceptionType.
        mapper - The exception mapper to be used by the returned AWSExceptionHandler.
        Returns:
        A FatalExceptionClassifier classifying based on exception type and error code.