I want to handle AwsServiceException based on the error code returned.
Where web page lists out all those possible error code? I cannot find it in the java doc.
private RuntimeException handleS3Exception(final AwsServiceException exception) {
if (exception.awsErrorDetails().errorCode().equals("NoSuchKey")) {
return new ObjectNotFoundException();
} else {
return exception;
}
}
Thank you!