protected BuilderImpl(AwsServiceException ex) { super(ex); this.awsErrorDetails = ex.awsErrorDetails(); }
@Override public boolean shouldRetry(RetryPolicyContext context) { Exception ex = context.exception(); if (ex instanceof AwsServiceException) { AwsServiceException exception = (AwsServiceException) ex; return retryableErrorCodes.contains(exception.awsErrorDetails().errorCode()); } return false; }
@Override public String getMessage() { if (awsErrorDetails != null) { return awsErrorDetails().errorMessage() + " (Service: " + awsErrorDetails().serviceName() + ", Status Code: " + statusCode() + ", Request ID: " + requestId() + ")"; } return super.getMessage(); }
} catch (AwsServiceException awsServiceException) { if (holdLockOnServiceUnavailable && awsServiceException.awsErrorDetails().sdkHttpResponse().statusCode() == HttpStatusCode.SERVICE_UNAVAILABLE) {